aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/dev-replace.c
diff options
context:
space:
mode:
authorAnand Jain <anand.jain@oracle.com>2019-01-17 10:32:31 -0500
committerDavid Sterba <dsterba@suse.com>2019-02-25 08:13:23 -0500
commite4319cd9cacef80a2d289f235b939ab8bd614683 (patch)
treeb86d6a50facd6a6a3c4fc8d35f4014c468ac5d6e /fs/btrfs/dev-replace.c
parent6e927cebe250f206ecb51020fa7caa012cf1fba9 (diff)
btrfs: refactor btrfs_find_device() take fs_devices as argument
btrfs_find_device() accepts fs_info as an argument and retrieves fs_devices from fs_info. Instead use fs_devices, so that this function can be used in non-mount (during device scanning) context as well. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
-rw-r--r--fs/btrfs/dev-replace.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
index 8750c835f535..6f0fe3623381 100644
--- a/fs/btrfs/dev-replace.c
+++ b/fs/btrfs/dev-replace.c
@@ -111,9 +111,9 @@ no_valid_dev_replace_entry_found:
111 break; 111 break;
112 case BTRFS_IOCTL_DEV_REPLACE_STATE_STARTED: 112 case BTRFS_IOCTL_DEV_REPLACE_STATE_STARTED:
113 case BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED: 113 case BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED:
114 dev_replace->srcdev = btrfs_find_device(fs_info, src_devid, 114 dev_replace->srcdev = btrfs_find_device(fs_info->fs_devices,
115 NULL, NULL); 115 src_devid, NULL, NULL);
116 dev_replace->tgtdev = btrfs_find_device(fs_info, 116 dev_replace->tgtdev = btrfs_find_device(fs_info->fs_devices,
117 BTRFS_DEV_REPLACE_DEVID, 117 BTRFS_DEV_REPLACE_DEVID,
118 NULL, NULL); 118 NULL, NULL);
119 /* 119 /*