]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Make btrfs_find_device_by_devspec return btrfs_device directly
authorNikolay Borisov <nborisov@suse.com>
Mon, 3 Sep 2018 09:46:14 +0000 (12:46 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 15 Oct 2018 15:23:30 +0000 (17:23 +0200)
commitdd4235fb0aa1c03591ee366aaf3a33a466a38aaa
tree4187cec66f66085176afed51436c29f71404b4b9
parent80b851bb4d74aa256873b79348125fb7b9f057bf
btrfs: Make btrfs_find_device_by_devspec return btrfs_device directly

Instead of returning an error value and using one of the parameters for
returning the actual object we are interested in just refactor the
function to directly return btrfs_device *. Also bubble up the error
handling for the special BTRFS_ERROR_DEV_MISSING_NOT_FOUND value into
btrfs_rm_device. 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/dev-replace.c
fs/btrfs/volumes.c
fs/btrfs/volumes.h