OSDN Git Service

btrfs: return the actual error value from from btrfs_uuid_tree_iterate
authorPan Bian <bianpan2016@163.com>
Sun, 4 Dec 2016 04:51:53 +0000 (12:51 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Nov 2017 08:37:28 +0000 (08:37 +0000)
commitb63209c78f9ec90b1cb43e458918b89f53e0db1b
treec66019fd31c8920c318673992bed5bee223d679b
parente88f3fb0e34059c6d697802dc385c756129c17a1
btrfs: return the actual error value from from btrfs_uuid_tree_iterate

[ Upstream commit 73ba39ab9307340dc98ec3622891314bbc09cc2e ]

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 <bianpan2016@163.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
[ edited subject ]
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/uuid-tree.c