1 From: Tao Ma <tao.ma@oracle.com>
2 Date: Thu, 12 Mar 2009 06:24:23 +0800
3 Subject: [PATCH] ocfs2: Fix a bug found by sparse check.
6 We need to use le32_to_cpu to test rec->e_cpos in
7 ocfs2_dinode_insert_check.
9 Signed-off-by: Tao Ma <tao.ma@oracle.com>
10 Acked-by: Joel Becker <joel.becker@oracle.com>
11 Signed-off-by: Mark Fasheh <mfasheh@suse.com>
13 fs/ocfs2/alloc.c | 3 ++-
14 1 files changed, 2 insertions(+), 1 deletions(-)
16 Index: linux-2.6.27-sle11_ocfs2_update2/fs/ocfs2/alloc.c
17 ===================================================================
18 --- linux-2.6.27-sle11_ocfs2_update2.orig/fs/ocfs2/alloc.c
19 +++ linux-2.6.27-sle11_ocfs2_update2/fs/ocfs2/alloc.c
20 @@ -174,7 +174,8 @@ static int ocfs2_dinode_insert_check(str
22 BUG_ON(OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL);
23 mlog_bug_on_msg(!ocfs2_sparse_alloc(osb) &&
24 - (OCFS2_I(inode)->ip_clusters != rec->e_cpos),
25 + (OCFS2_I(inode)->ip_clusters !=
26 + le32_to_cpu(rec->e_cpos)),
27 "Device %s, asking for sparse allocation: inode %llu, "
28 "cpos %u, clusters %u\n",