Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 74e77eb3 authored by Tao Ma's avatar Tao Ma Committed by Mark Fasheh
Browse files

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: default avatarTao Ma <tao.ma@oracle.com>
Acked-by: default avatarJoel Becker <joel.becker@oracle.com>
Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
parent d9ae49d6
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -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,