diff options
author | Wang Shilong <wangsl-fnst@cn.fujitsu.com> | 2013-04-07 12:24:57 +0200 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-05-06 21:54:37 +0200 |
commit | 7708f029dca5f1b9e9d6ea01ab10cd83e4c74ff2 (patch) | |
tree | bcaa238c4e7f5ccb19382fb1035aba79a69b6a4f /fs/btrfs/ioctl.c | |
parent | btrfs: abort unlink trans in missed error case (diff) | |
download | linux-7708f029dca5f1b9e9d6ea01ab10cd83e4c74ff2.tar.xz linux-7708f029dca5f1b9e9d6ea01ab10cd83e4c74ff2.zip |
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.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) goto drop_write; } + down_write(&root->fs_info->subvol_sem); if (sa->cmd != BTRFS_QUOTA_CTL_RESCAN) { trans = btrfs_start_transaction(root, 2); if (IS_ERR(trans)) { @@ -3730,6 +3731,7 @@ static long btrfs_ioctl_quota_ctl(struct file *file, void __user *arg) } out: kfree(sa); + up_write(&root->fs_info->subvol_sem); drop_write: mnt_drop_write_file(file); return ret; |