1
0
Fork 0

ext4: set error return correctly when ext4_htree_store_dirent fails

Currently when the call to ext4_htree_store_dirent fails the error return
variable 'ret' is is not being set to the error code and variable count is
instead, hence the error code is not being returned.  Fix this by assigning
ret to the error return code.

Addresses-Coverity: ("Unused value")
Fixes: 8af0f08227 ("ext4: fix readdir error in the case of inline_data+dir_index")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
alistair/sunxi64-5.4-dsi
Colin Ian King 2019-08-12 14:29:38 -04:00 committed by Theodore Ts'o
parent cd2d99229d
commit 7a14826ede
1 changed files with 1 additions and 1 deletions

View File

@ -1416,7 +1416,7 @@ int ext4_inlinedir_to_tree(struct file *dir_file,
err = ext4_htree_store_dirent(dir_file, hinfo->hash,
hinfo->minor_hash, de, &tmp_str);
if (err) {
count = err;
ret = err;
goto out;
}
count++;