From 3e1e6f8409798805627712dbb1659d37e3ea7d3d Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Wed, 29 Oct 2014 16:32:54 +1100 Subject: [PATCH] libxfs: fix endian mishap in xfs_dialloc_ag() 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 Reviewed-by: Brian Foster Signed-off-by: Dave Chinner --- libxfs/xfs_ialloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libxfs/xfs_ialloc.c b/libxfs/xfs_ialloc.c index 5462c54d0..b20a9ec6d 100644 --- a/libxfs/xfs_ialloc.c +++ b/libxfs/xfs_ialloc.c @@ -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; -- 2.50.1