aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-07-08 14:19:17 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:04 -0400
commit7d9eb12c8739e7dc80c78c6b3596f912ecd8f941 (patch)
tree000608285b44920f22e0888753b36299bc762cef /fs/btrfs/ioctl.c
parenta7a16fd772620605c76e8ac8bdbc8ccc9e3df1a0 (diff)
Btrfs: Add locking around volume management (device add/remove/balance)
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 026039a2ac58..83f17a5cbd6a 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -307,8 +307,7 @@ static int btrfs_ioctl_resize(struct btrfs_root *root, void __user *arg)
307 goto out; 307 goto out;
308 } 308 }
309 309
310 mutex_lock(&root->fs_info->alloc_mutex); 310 mutex_lock(&root->fs_info->volume_mutex);
311 mutex_lock(&root->fs_info->chunk_mutex);
312 sizestr = vol_args->name; 311 sizestr = vol_args->name;
313 devstr = strchr(sizestr, ':'); 312 devstr = strchr(sizestr, ':');
314 if (devstr) { 313 if (devstr) {
@@ -378,8 +377,7 @@ static int btrfs_ioctl_resize(struct btrfs_root *root, void __user *arg)
378 } 377 }
379 378
380out_unlock: 379out_unlock:
381 mutex_lock(&root->fs_info->alloc_mutex); 380 mutex_unlock(&root->fs_info->volume_mutex);
382 mutex_lock(&root->fs_info->chunk_mutex);
383out: 381out:
384 kfree(vol_args); 382 kfree(vol_args);
385 return ret; 383 return ret;