aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorWang Shilong <wangsl-fnst@cn.fujitsu.com>2013-04-07 06:24:57 -0400
committerJosef Bacik <jbacik@fusionio.com>2013-05-06 15:54:37 -0400
commit7708f029dca5f1b9e9d6ea01ab10cd83e4c74ff2 (patch)
treebcaa238c4e7f5ccb19382fb1035aba79a69b6a4f /fs/btrfs/ioctl.c
parentd4e3991b9945906528c7abb627d759ea43f53bce (diff)
Btrfs: creating the subvolume qgroup automatically when enabling quota
Creating the subvolume/snapshots(including root subvolume) qgroup auotomatically when enabling quota. Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com> Reviewed-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r--fs/btrfs/ioctl.c2
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 }
3731out: 3732out:
3732 kfree(sa); 3733 kfree(sa);
3734 up_write(&root->fs_info->subvol_sem);
3733drop_write: 3735drop_write:
3734 mnt_drop_write_file(file); 3736 mnt_drop_write_file(file);
3735 return ret; 3737 return ret;