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
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]>
  • Loading branch information
SinkFinder authored and kdave committed Dec 19, 2016
1 parent 2939e1a commit 73ba39a
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 @@ -352,7 +352,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 73ba39a

Please sign in to comment.