public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfsprogs: fix endian mishap in xfs_dialloc_ag()
@ 2014-10-23 23:31 Eric Sandeen
  2014-10-27 11:25 ` Brian Foster
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2014-10-23 23:31 UTC (permalink / raw)
  To: xfs-oss

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>
---

diff --git a/libxfs/xfs_ialloc.c b/libxfs/xfs_ialloc.c
index 5462c54..b20a9ec 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;

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-27 11:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-23 23:31 [PATCH] xfsprogs: fix endian mishap in xfs_dialloc_ag() Eric Sandeen
2014-10-27 11:25 ` Brian Foster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox