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:39:14 +0000 (08:39 +0000)
commit79dec0116f8ba872f7d40530c36f3c71d2a839ec
tree1ce0e0b97b8d097d6c18d64b0b533c53af72bd25
parentbdc2571db9e7215c0557997eb763d9d4b42e9e8a
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