aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/dev-replace.c
diff options
context:
space:
mode:
authorAnand Jain <anand.jain@oracle.com>2016-02-12 21:01:37 -0500
committerDavid Sterba <dsterba@suse.com>2016-04-28 04:59:13 -0400
commitb3d1b1532ff9620ff5dba891a96f3e912005eb10 (patch)
tree50ca54581e2527399b16d4b7b6825a99ab5d617b /fs/btrfs/dev-replace.c
parent24fc572fe456c02ff4136c07861a3edd4b8de683 (diff)
btrfs: enhance btrfs_find_device_by_user_input() to check device path
The operation of device replace and device delete follows same steps upto some depth with in btrfs kernel, however they don't share codes. This enhancement will help replace and delete to share codes. Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/dev-replace.c')
-rw-r--r--fs/btrfs/dev-replace.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
index 7ad8ae994ca0..fdd2880707df 100644
--- a/fs/btrfs/dev-replace.c
+++ b/fs/btrfs/dev-replace.c
@@ -320,10 +320,6 @@ int btrfs_dev_replace_start(struct btrfs_root *root,
320 return -EINVAL; 320 return -EINVAL;
321 } 321 }
322 322
323 if ((args->start.srcdevid == 0 && args->start.srcdev_name[0] == '\0') ||
324 args->start.tgtdev_name[0] == '\0')
325 return -EINVAL;
326
327 /* the disk copy procedure reuses the scrub code */ 323 /* the disk copy procedure reuses the scrub code */
328 mutex_lock(&fs_info->volume_mutex); 324 mutex_lock(&fs_info->volume_mutex);
329 ret = btrfs_find_device_by_user_input(root, args->start.srcdevid, 325 ret = btrfs_find_device_by_user_input(root, args->start.srcdevid,