aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorStefan Behrens <sbehrens@giantdisaster.de>2012-11-05 11:03:39 -0500
committerJosef Bacik <jbacik@fusionio.com>2012-12-12 17:15:36 -0500
commitaa1b8cd409f05e1489ec77ff219eff6ed4b801b8 (patch)
tree92d091da518c2c9b141b5649663a7aa9c0d5624c /fs/btrfs/ioctl.c
parenta8a6dab77997a371f1925a4001021eea3ee5cb88 (diff)
Btrfs: pass fs_info instead of root
A small number of functions that are used in a device replace procedure when the operation is resumed at mount time are unable to pass the same root pointer that would be used in the regular (ioctl) context. And since the root pointer is not required, only the fs_info is, the root pointer argument is replaced with the fs_info pointer argument. Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index e262cd8c4a7d..b40b827f93e7 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1343,7 +1343,7 @@ static noinline int btrfs_ioctl_resize(struct btrfs_root *root,
1343 printk(KERN_INFO "btrfs: resizing devid %llu\n", 1343 printk(KERN_INFO "btrfs: resizing devid %llu\n",
1344 (unsigned long long)devid); 1344 (unsigned long long)devid);
1345 } 1345 }
1346 device = btrfs_find_device(root, devid, NULL, NULL); 1346 device = btrfs_find_device(root->fs_info, devid, NULL, NULL);
1347 if (!device) { 1347 if (!device) {
1348 printk(KERN_INFO "btrfs: resizer unable to find device %llu\n", 1348 printk(KERN_INFO "btrfs: resizer unable to find device %llu\n",
1349 (unsigned long long)devid); 1349 (unsigned long long)devid);
@@ -2332,7 +2332,7 @@ static long btrfs_ioctl_dev_info(struct btrfs_root *root, void __user *arg)
2332 s_uuid = di_args->uuid; 2332 s_uuid = di_args->uuid;
2333 2333
2334 mutex_lock(&fs_devices->device_list_mutex); 2334 mutex_lock(&fs_devices->device_list_mutex);
2335 dev = btrfs_find_device(root, di_args->devid, s_uuid, NULL); 2335 dev = btrfs_find_device(root->fs_info, di_args->devid, s_uuid, NULL);
2336 mutex_unlock(&fs_devices->device_list_mutex); 2336 mutex_unlock(&fs_devices->device_list_mutex);
2337 2337
2338 if (!dev) { 2338 if (!dev) {
@@ -3089,7 +3089,7 @@ static long btrfs_ioctl_scrub(struct btrfs_root *root, void __user *arg)
3089 if (IS_ERR(sa)) 3089 if (IS_ERR(sa))
3090 return PTR_ERR(sa); 3090 return PTR_ERR(sa);
3091 3091
3092 ret = btrfs_scrub_dev(root, sa->devid, sa->start, sa->end, 3092 ret = btrfs_scrub_dev(root->fs_info, sa->devid, sa->start, sa->end,
3093 &sa->progress, sa->flags & BTRFS_SCRUB_READONLY); 3093 &sa->progress, sa->flags & BTRFS_SCRUB_READONLY);
3094 3094
3095 if (copy_to_user(arg, sa, sizeof(*sa))) 3095 if (copy_to_user(arg, sa, sizeof(*sa)))
@@ -3104,7 +3104,7 @@ static long btrfs_ioctl_scrub_cancel(struct btrfs_root *root, void __user *arg)
3104 if (!capable(CAP_SYS_ADMIN)) 3104 if (!capable(CAP_SYS_ADMIN))
3105 return -EPERM; 3105 return -EPERM;
3106 3106
3107 return btrfs_scrub_cancel(root); 3107 return btrfs_scrub_cancel(root->fs_info);
3108} 3108}
3109 3109
3110static long btrfs_ioctl_scrub_progress(struct btrfs_root *root, 3110static long btrfs_ioctl_scrub_progress(struct btrfs_root *root,