Commit 8fca8a2b authored by Xin Yin's avatar Xin Yin Committed by Theodore Ts'o
Browse files

ext4: fix incorrect type issue during replay_del_range



should not use fast commit log data directly, add le32_to_cpu().

Reported-by: default avatarkernel test robot <lkp@intel.com>
Fixes: 0b5b5a62 ("ext4: use ext4_ext_remove_space() for fast commit replay delete range")
Cc: stable@kernel.org
Signed-off-by: default avatarXin Yin <yinxin.x@bytedance.com>
Reviewed-by: default avatarRitesh Harjani <riteshh@linux.ibm.com>
Link: https://lore.kernel.org/r/20220126063146.2302-1-yinxin.x@bytedance.com


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 715a67f1
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1794,8 +1794,9 @@ ext4_fc_replay_del_range(struct super_block *sb, struct ext4_fc_tl *tl,
	}

	down_write(&EXT4_I(inode)->i_data_sem);
	ret = ext4_ext_remove_space(inode, lrange.fc_lblk,
				lrange.fc_lblk + lrange.fc_len - 1);
	ret = ext4_ext_remove_space(inode, le32_to_cpu(lrange.fc_lblk),
				le32_to_cpu(lrange.fc_lblk) +
				le32_to_cpu(lrange.fc_len) - 1);
	up_write(&EXT4_I(inode)->i_data_sem);
	if (ret)
		goto out;