Commit 8fedebb5 authored by Wang Jianjian's avatar Wang Jianjian Committed by Theodore Ts'o

ext4: fix incorrect offset

The last argument of ext4_check_dir_entry is dentry offset int the
file.  Luckily this error only results in the wrong offset being
printed in the eventual error message.
Signed-off-by: default avatarWang Jianjian <wangjianjian0@foxmail.com>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/tencent_F992989953734FD5DE3F88ECB2191A856206@qq.comSigned-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
parent 8e387c89
......@@ -2280,8 +2280,7 @@ static int make_indexed_dir(handle_t *handle, struct ext4_filename *fname,
top = data2 + len;
while ((char *)(de2 = ext4_next_entry(de, blocksize)) < top) {
if (ext4_check_dir_entry(dir, NULL, de, bh2, data2, len,
(data2 + (blocksize - csum_size) -
(char *) de))) {
(char *)de - data2)) {
brelse(bh2);
brelse(bh);
return -EFSCORRUPTED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment