]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.fixes/ocfs2-fix-a-bug-found-by-sparse-check.patch
Imported linux-2.6.27.39 suse/xen patches.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.fixes / ocfs2-fix-a-bug-found-by-sparse-check.patch
CommitLineData
2cb7cef9
BS
1From: Tao Ma <tao.ma@oracle.com>
2Date: Thu, 12 Mar 2009 06:24:23 +0800
3Subject: [PATCH] ocfs2: Fix a bug found by sparse check.
4Patch-mainline: 2.6.29
5
6We need to use le32_to_cpu to test rec->e_cpos in
7ocfs2_dinode_insert_check.
8
9Signed-off-by: Tao Ma <tao.ma@oracle.com>
10Acked-by: Joel Becker <joel.becker@oracle.com>
11Signed-off-by: Mark Fasheh <mfasheh@suse.com>
12---
13 fs/ocfs2/alloc.c | 3 ++-
14 1 files changed, 2 insertions(+), 1 deletions(-)
15
16Index: 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
21
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",
29 osb->dev_str,