btrfs: btrfs_init_new_device should use fs_info->dev_root

btrfs_init_new_device only uses the root passed in via the ioctl to
start the transaction.  Nothing else that happens is related to whatever
root the user used to initiate the ioctl.  We can drop the root requirement
and just use fs_info->dev_root instead.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Jeff Mahoney
2016-06-21 20:16:08 -04:00
committed by David Sterba
parent 6bccf3ab1e
commit 5112febbc7
3 changed files with 4 additions and 3 deletions

View File

@@ -2672,7 +2672,7 @@ static long btrfs_ioctl_add_dev(struct btrfs_root *root, void __user *arg)
}
vol_args->name[BTRFS_PATH_NAME_MAX] = '\0';
ret = btrfs_init_new_device(root, vol_args->name);
ret = btrfs_init_new_device(root->fs_info, vol_args->name);
if (!ret)
btrfs_info(root->fs_info, "disk added %s",vol_args->name);