1 ext4: set error return correctly when ext4_htree_store_dirent fails
3 From: Colin Ian King <colin.king@canonical.com>
5 Currently when the call to ext4_htree_store_dirent fails the error return
6 variable 'ret' is is not being set to the error code and variable count is
7 instead, hence the error code is not being returned. Fix this by assigning
8 ret to the error return code.
10 Addresses-Coverity: ("Unused value")
11 Fixes: 8af0f0822797 ("ext4: fix readdir error in the case of inline_data+dir_index")
12 Signed-off-by: Colin Ian King <colin.king@canonical.com>
13 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
15 fs/ext4/inline.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
18 diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
19 index 88cdf3c90bd1..2fec62d764fa 100644
20 --- a/fs/ext4/inline.c
21 +++ b/fs/ext4/inline.c
22 @@ -1416,7 +1416,7 @@ int ext4_inlinedir_to_tree(struct file *dir_file,
23 err = ext4_htree_store_dirent(dir_file, hinfo->hash,
24 hinfo->minor_hash, de, &tmp_str);