summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/volumes.h
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2018-09-03 05:46:14 -0400
committerDavid Sterba <dsterba@suse.com>2018-10-15 11:23:30 -0400
commita27a94c2b0c727517c17cf2ca3a9f7291caadfbc (patch)
tree4187cec66f66085176afed51436c29f71404b4b9 /fs/btrfs/volumes.h
parent6c05040702e7793e8ee63bb8384ac2f9235c926e (diff)
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>
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r--fs/btrfs/volumes.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h
index e7811473024d..aefce895e994 100644
--- a/fs/btrfs/volumes.h
+++ b/fs/btrfs/volumes.h
@@ -410,9 +410,9 @@ int btrfs_close_devices(struct btrfs_fs_devices *fs_devices);
410void btrfs_free_extra_devids(struct btrfs_fs_devices *fs_devices, int step); 410void btrfs_free_extra_devids(struct btrfs_fs_devices *fs_devices, int step);
411void btrfs_assign_next_active_device(struct btrfs_device *device, 411void btrfs_assign_next_active_device(struct btrfs_device *device,
412 struct btrfs_device *this_dev); 412 struct btrfs_device *this_dev);
413int btrfs_find_device_by_devspec(struct btrfs_fs_info *fs_info, u64 devid, 413struct btrfs_device *btrfs_find_device_by_devspec(struct btrfs_fs_info *fs_info,
414 const char *devpath, 414 u64 devid,
415 struct btrfs_device **device); 415 const char *devpath);
416struct btrfs_device *btrfs_alloc_device(struct btrfs_fs_info *fs_info, 416struct btrfs_device *btrfs_alloc_device(struct btrfs_fs_info *fs_info,
417 const u64 *devid, 417 const u64 *devid,
418 const u8 *uuid); 418 const u8 *uuid);