Skip to content

Commit

Permalink
ext4: set error return correctly when ext4_htree_store_dirent fails
Browse files Browse the repository at this point in the history
task #28557685

[ Upstream commit 7a14826 ]

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: 8af0f08 ("ext4: fix readdir error in the case of inline_data+dir_index")
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Theodore Ts'o <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Jeffle Xu <[email protected]>
Acked-by: Joseph Qi <[email protected]>
  • Loading branch information
Colin Ian King authored and lostjeffle committed Jun 16, 2020
1 parent b23f809 commit 219c5eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ext4/inline.c
Original file line number Diff line number Diff line change
Expand Up @@ -1419,7 +1419,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++;
Expand Down

0 comments on commit 219c5eb

Please sign in to comment.