]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Make btrfs_find_device_missing_or_by_path return directly a device
authorNikolay Borisov <nborisov@suse.com>
Mon, 3 Sep 2018 09:46:13 +0000 (12:46 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 15 Oct 2018 15:23:29 +0000 (17:23 +0200)
commit80b851bb4d74aa256873b79348125fb7b9f057bf
tree800359b874392851d3b6549b7a60739097d3ac2b
parente893641fc26fede219b8ad60666f7aba4472c565
btrfs: Make btrfs_find_device_missing_or_by_path return directly a device

This function returns a numeric error value and additionally the
device found in one of its input parameters. Simplify this by making
the function directly return a pointer to btrfs_device. Additionally
adjust the caller to handle the case when we want to remove the
'missing' device and ENOENT is returned to return the expected
positive error value, parsed by progs. Finally, unexport the function
since it's not called outside of volume.c. No functional changes.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c
fs/btrfs/volumes.h