diff options
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 9c44d657b795..4fc9751d2e0c 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -3697,6 +3697,7 @@ static long btrfs_ioctl_quota_ctl(struct file *file, void __user *arg) | |||
3697 | goto drop_write; | 3697 | goto drop_write; |
3698 | } | 3698 | } |
3699 | 3699 | ||
3700 | down_write(&root->fs_info->subvol_sem); | ||
3700 | if (sa->cmd != BTRFS_QUOTA_CTL_RESCAN) { | 3701 | if (sa->cmd != BTRFS_QUOTA_CTL_RESCAN) { |
3701 | trans = btrfs_start_transaction(root, 2); | 3702 | trans = btrfs_start_transaction(root, 2); |
3702 | if (IS_ERR(trans)) { | 3703 | if (IS_ERR(trans)) { |
@@ -3730,6 +3731,7 @@ static long btrfs_ioctl_quota_ctl(struct file *file, void __user *arg) | |||
3730 | } | 3731 | } |
3731 | out: | 3732 | out: |
3732 | kfree(sa); | 3733 | kfree(sa); |
3734 | up_write(&root->fs_info->subvol_sem); | ||
3733 | drop_write: | 3735 | drop_write: |
3734 | mnt_drop_write_file(file); | 3736 | mnt_drop_write_file(file); |
3735 | return ret; | 3737 | return ret; |