diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-07-08 14:19:17 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:04 -0400 |
commit | 7d9eb12c8739e7dc80c78c6b3596f912ecd8f941 (patch) | |
tree | 000608285b44920f22e0888753b36299bc762cef /fs/btrfs/ioctl.c | |
parent | a7a16fd772620605c76e8ac8bdbc8ccc9e3df1a0 (diff) | |
download | linux-3.10-7d9eb12c8739e7dc80c78c6b3596f912ecd8f941.tar.gz linux-3.10-7d9eb12c8739e7dc80c78c6b3596f912ecd8f941.tar.bz2 linux-3.10-7d9eb12c8739e7dc80c78c6b3596f912ecd8f941.zip |
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.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 026039a2ac5..83f17a5cbd6 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) goto out; } - mutex_lock(&root->fs_info->alloc_mutex); - mutex_lock(&root->fs_info->chunk_mutex); + mutex_lock(&root->fs_info->volume_mutex); sizestr = vol_args->name; devstr = strchr(sizestr, ':'); if (devstr) { @@ -378,8 +377,7 @@ static int btrfs_ioctl_resize(struct btrfs_root *root, void __user *arg) } out_unlock: - mutex_lock(&root->fs_info->alloc_mutex); - mutex_lock(&root->fs_info->chunk_mutex); + mutex_unlock(&root->fs_info->volume_mutex); out: kfree(vol_args); return ret; |