aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/qgroup.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/qgroup.c')
-rw-r--r--fs/btrfs/qgroup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index 464d1e237512..4fb9610beec7 100644
--- a/fs/btrfs/qgroup.c
+++ b/fs/btrfs/qgroup.c
@@ -1009,6 +1009,10 @@ int btrfs_add_qgroup_relation(struct btrfs_trans_handle *trans,
1009 struct btrfs_qgroup_list *list; 1009 struct btrfs_qgroup_list *list;
1010 int ret = 0; 1010 int ret = 0;
1011 1011
1012 /* Check the level of src and dst first */
1013 if (btrfs_qgroup_level(src) >= btrfs_qgroup_level(dst))
1014 return -EINVAL;
1015
1012 mutex_lock(&fs_info->qgroup_ioctl_lock); 1016 mutex_lock(&fs_info->qgroup_ioctl_lock);
1013 quota_root = fs_info->quota_root; 1017 quota_root = fs_info->quota_root;
1014 if (!quota_root) { 1018 if (!quota_root) {