diff options
author | Anand Jain <anand.jain@oracle.com> | 2019-01-19 01:48:55 -0500 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-02-25 08:13:24 -0500 |
commit | 09ba3bc9dd150457c506e4661380a6183af651c1 (patch) | |
tree | 01349e5790ff3dade04f8651ccc29330a036f74b /fs/btrfs/dev-replace.c | |
parent | 70bc7088aaedd7260fcdc18ecebc60881771acb3 (diff) |
btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c index 6f0fe3623381..13863354ff9d 100644 --- a/fs/btrfs/dev-replace.c +++ b/fs/btrfs/dev-replace.c | |||
@@ -112,10 +112,10 @@ no_valid_dev_replace_entry_found: | |||
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->fs_devices, | 114 | dev_replace->srcdev = btrfs_find_device(fs_info->fs_devices, |
115 | src_devid, NULL, NULL); | 115 | src_devid, NULL, NULL, true); |
116 | dev_replace->tgtdev = btrfs_find_device(fs_info->fs_devices, | 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, true); |
119 | /* | 119 | /* |
120 | * allow 'btrfs dev replace_cancel' if src/tgt device is | 120 | * allow 'btrfs dev replace_cancel' if src/tgt device is |
121 | * missing | 121 | * missing |