Skip to content

Commit

Permalink
btrfs: return the actual error value from from btrfs_uuid_tree_iterate
Browse files Browse the repository at this point in the history
[ Upstream commit 73ba39a ]

In function btrfs_uuid_tree_iterate(), errno is assigned to variable ret
on errors. However, it directly returns 0. It may be better to return
ret. This patch also removes the warning, because the caller already
prints a warning.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188731
Signed-off-by: Pan Bian <[email protected]>
Reviewed-by: Omar Sandoval <[email protected]>
[ edited subject ]
Signed-off-by: David Sterba <[email protected]>

Signed-off-by: Sasha Levin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
SinkFinder authored and gregkh committed Nov 30, 2017
1 parent bdc2571 commit 79dec01
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/btrfs/uuid-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,5 @@ int btrfs_uuid_tree_iterate(struct btrfs_fs_info *fs_info,

out:
btrfs_free_path(path);
if (ret)
btrfs_warn(fs_info, "btrfs_uuid_tree_iterate failed %d", ret);
return 0;
return ret;
}

0 comments on commit 79dec01

Please sign in to comment.