From: Xin Yin <yinxin.x@xxxxxxxxxxxxx> commit 8fca8a2b0a822f7936130af7299d2fd7f0a66714 upstream. should not use fast commit log data directly, add le32_to_cpu(). Reported-by: kernel test robot <lkp@xxxxxxxxx> Fixes: 0b5b5a62b945 ("ext4: use ext4_ext_remove_space() for fast commit replay delete range") Cc: stable@xxxxxxxxxx Signed-off-by: Xin Yin <yinxin.x@xxxxxxxxxxxxx> Reviewed-by: Ritesh Harjani <riteshh@xxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20220126063146.2302-1-yinxin.x@xxxxxxxxxxxxx Signed-off-by: Theodore Ts'o <tytso@xxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/ext4/fast_commit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/fs/ext4/fast_commit.c +++ b/fs/ext4/fast_commit.c @@ -1819,8 +1819,9 @@ ext4_fc_replay_del_range(struct super_bl } 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; Patches currently in stable-queue which might be from yinxin.x@xxxxxxxxxxxxx are queue-5.16/ext4-fix-incorrect-type-issue-during-replay_del_range.patch queue-5.16/ext4-prevent-used-blocks-from-being-allocated-during-fast-commit-replay.patch queue-5.16/ext4-modify-the-logic-of-ext4_mb_new_blocks_simple.patch