summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-08-12 14:29:38 -0400
committerTheodore Ts'o <tytso@mit.edu>2019-08-12 14:29:38 -0400
commit7a14826ede1d714f0bb56de8167c0e519041eeda (patch)
treee7c34a9f0263a46859b7e8f2365fa093e017e094
parentcd2d99229dc96219547e6349841e1aad851c6acc (diff)
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: 8af0f0822797 ("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>
-rw-r--r--fs/ext4/inline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index 88cdf3c90bd1..2fec62d764fa 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -1416,7 +1416,7 @@ int ext4_inlinedir_to_tree(struct file *dir_file,
1416 err = ext4_htree_store_dirent(dir_file, hinfo->hash, 1416 err = ext4_htree_store_dirent(dir_file, hinfo->hash,
1417 hinfo->minor_hash, de, &tmp_str); 1417 hinfo->minor_hash, de, &tmp_str);
1418 if (err) { 1418 if (err) {
1419 count = err; 1419 ret = err;
1420 goto out; 1420 goto out;
1421 } 1421 }
1422 count++; 1422 count++;