summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-08-12 21:29:38 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-29 12:21:46 +0300
commit6072e7f72dcd459de87907a0fd32d0fbc65f3073 (patch)
tree064adabc7439b2e1319185978fb7447223b0281e
parent8badac0c617bf866e5ba4792cb843258be19d7c3 (diff)
downloadlinux-6072e7f72dcd459de87907a0fd32d0fbc65f3073.tar.xz
ext4: set error return correctly when ext4_htree_store_dirent fails
[ Upstream commit 7a14826ede1d714f0bb56de8167c0e519041eeda ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
-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 0dcd33f62637..00f9433eea23 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -1418,7 +1418,7 @@ int htree_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++;