| To: | xfs-oss <xfs@xxxxxxxxxxx> |
|---|---|
| Subject: | [PATCH] xfsprogs: fix endian mishap in xfs_dialloc_ag() |
| From: | Eric Sandeen <sandeen@xxxxxxxxxx> |
| Date: | Thu, 23 Oct 2014 18:31:53 -0500 |
| Delivered-to: | xfs@xxxxxxxxxxx |
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@xxxxxxxxxx>
---
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;
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH] xfsprogs: enable sparse checking, Eric Sandeen |
|---|---|
| Next by Date: | [PATCH] xfsprogs: fix harmless sparse endian nit, Eric Sandeen |
| Previous by Thread: | [PATCH] xfsprogs: enable sparse checking, Eric Sandeen |
| Next by Thread: | Re: [PATCH] xfsprogs: fix endian mishap in xfs_dialloc_ag(), Brian Foster |
| Indexes: | [Date] [Thread] [Top] [All Lists] |