[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1208230131.11920.59.camel@brick>
Date: Mon, 14 Apr 2008 20:28:51 -0700
From: Harvey Harrison <harvey.harrison@...il.com>
To: Christoph Hellwig <hch@....de>,
Andrew Morton <akpm@...ux-foundation.org>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH-possible bugfix] xfs: ensure extents are read as be64
The debug code reads the extents in cpu-order rather than BE. Make the
debug code match.
Signed-off-by: Harvey Harrison <harvey.harrison@...il.com>
---
Possibly 2.6.25 material....if it actually is a bug. See elsewhere
in the same file that reads as be64. (look for ep->l0).
fs/xfs/xfs_inode.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index f43a6e0..eacf2ca 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -85,8 +85,8 @@ xfs_validate_extents(
for (i = 0; i < nrecs; i++) {
xfs_bmbt_rec_host_t *ep = xfs_iext_get_ext(ifp, i);
- rec.l0 = get_unaligned(&ep->l0);
- rec.l1 = get_unaligned(&ep->l1);
+ rec.l0 = be64_to_cpu(get_unaligned(&ep->l0));
+ rec.l1 = be64_to_cpu(get_unaligned(&ep->l1));
xfs_bmbt_get_all(&rec, &irec);
if (fmt == XFS_EXTFMT_NOSTATE)
ASSERT(irec.br_state == XFS_EXT_NORM);
--
1.5.5.144.g3e42
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists