]> 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)
commit13c22c45abfd5315a07c8646169e0528db95ad17
tree4187cec66f66085176afed51436c29f71404b4b9
parent6e16e5b75a0b4364fd1579f6772fb2ccaa4f4151
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