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>
This commit is contained in:
Tao Ma 2009-03-12 06:24:23 +08:00 committed by Mark Fasheh
parent d9ae49d6e2
commit 74e77eb30d

View file

@ -176,7 +176,8 @@ static int ocfs2_dinode_insert_check(struct inode *inode,
BUG_ON(OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL); BUG_ON(OCFS2_I(inode)->ip_dyn_features & OCFS2_INLINE_DATA_FL);
mlog_bug_on_msg(!ocfs2_sparse_alloc(osb) && mlog_bug_on_msg(!ocfs2_sparse_alloc(osb) &&
(OCFS2_I(inode)->ip_clusters != rec->e_cpos), (OCFS2_I(inode)->ip_clusters !=
le32_to_cpu(rec->e_cpos)),
"Device %s, asking for sparse allocation: inode %llu, " "Device %s, asking for sparse allocation: inode %llu, "
"cpos %u, clusters %u\n", "cpos %u, clusters %u\n",
osb->dev_str, osb->dev_str,