aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/dev-replace.c
diff options
context:
space:
mode:
authorAnand Jain <[email protected]>2016-02-13 02:01:37 +0000
committerDavid Sterba <[email protected]>2016-04-28 08:59:13 +0000
commitb3d1b1532ff9620ff5dba891a96f3e912005eb10 (patch)
tree50ca54581e2527399b16d4b7b6825a99ab5d617b /fs/btrfs/dev-replace.c
parentbtrfs: make use of btrfs_find_device_by_user_input() (diff)
downloadkernel-b3d1b1532ff9620ff5dba891a96f3e912005eb10.tar.gz
kernel-b3d1b1532ff9620ff5dba891a96f3e912005eb10.zip
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 <[email protected]> Signed-off-by: David Sterba <[email protected]>
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,
return -EINVAL;
}
- if ((args->start.srcdevid == 0 && args->start.srcdev_name[0] == '\0') ||
- args->start.tgtdev_name[0] == '\0')
- return -EINVAL;
-
/* the disk copy procedure reuses the scrub code */
mutex_lock(&fs_info->volume_mutex);
ret = btrfs_find_device_by_user_input(root, args->start.srcdevid,