Skip to content

Commit

Permalink
ocfs2: Fix a bug found by sparse check.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tao Ma authored and Mark Fasheh committed Mar 12, 2009
1 parent d9ae49d commit 74e77eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/ocfs2/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
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, "
"cpos %u, clusters %u\n",
osb->dev_str,
Expand Down

0 comments on commit 74e77eb

Please sign in to comment.