]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
libxfs: fix endian mishap in xfs_dialloc_ag()
authorEric Sandeen <sandeen@redhat.com>
Wed, 29 Oct 2014 05:32:54 +0000 (16:32 +1100)
committerDave Chinner <david@fromorbit.com>
Wed, 29 Oct 2014 05:32:54 +0000 (16:32 +1100)
Fixes a regression introduced by:

88fc730 xfs: use and update the finobt on inode allocation

which passed the non-swapped version of agi->agi_newino to
xfs_inobt_lookup()

Caught by make C=2, ftw!

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
libxfs/xfs_ialloc.c

index 5462c54d046e4eb52b48a74b65ef3ab8062d2069..b20a9ec6d0cf22112b33037b08b2eb7b6956c377 100644 (file)
@@ -1057,7 +1057,8 @@ xfs_dialloc_ag(
                 * most recently allocated inode.
                 */
                if (agi->agi_newino != cpu_to_be32(NULLAGINO)) {
-                       error = xfs_inobt_lookup(cur, agi->agi_newino,
+                       error = xfs_inobt_lookup(cur,
+                                                be32_to_cpu(agi->agi_newino),
                                                 XFS_LOOKUP_EQ, &i);
                        if (error)
                                goto error_cur;