diff options
author | Tao Ma <tao.ma@oracle.com> | 2009-03-11 18:24:23 -0400 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2009-03-12 19:46:01 -0400 |
commit | 74e77eb30d0ecbb12964d005b439c8b84a505b84 (patch) | |
tree | 99e14b596439c1cc04a8559859939e7e47825479 /fs | |
parent | d9ae49d6e2b1ac9166e58ae3c9345135604beaa6 (diff) |
ocfs2: Fix a bug found by sparse check.
We need to use le32_to_cpu to test rec->e_cpos in
ocfs2_dinode_insert_check.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Acked-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ocfs2/alloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index 3a9e5deed74d..19e3a96aa02c 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
@@ -176,7 +176,8 @@ static int ocfs2_dinode_insert_check(struct inode *inode, | |||
176 | 176 | ||
177 | BUG_ON(OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL); | 177 | BUG_ON(OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL); |
178 | mlog_bug_on_msg(!ocfs2_sparse_alloc(osb) && | 178 | mlog_bug_on_msg(!ocfs2_sparse_alloc(osb) && |
179 | (OCFS2_I(inode)->ip_clusters != rec->e_cpos), | 179 | (OCFS2_I(inode)->ip_clusters != |
180 | le32_to_cpu(rec->e_cpos)), | ||
180 | "Device %s, asking for sparse allocation: inode %llu, " | 181 | "Device %s, asking for sparse allocation: inode %llu, " |
181 | "cpos %u, clusters %u\n", | 182 | "cpos %u, clusters %u\n", |
182 | osb->dev_str, | 183 | osb->dev_str, |