Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 374857
b: refs/heads/master
c: b7fef4f
h: refs/heads/master
i:
  374855: 2649459
v: v3
  • Loading branch information
Wang Shilong authored and Josef Bacik committed May 6, 2013
1 parent 87e0091 commit 6a78a31
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 58400fce5ac5939aadac8ce682edc192c6172f80
refs/heads/master: b7fef4f593007d52ba7fe4427e099bd71c63c521
8 changes: 8 additions & 0 deletions trunk/fs/btrfs/qgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,8 @@ int btrfs_add_qgroup_relation(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info, u64 src, u64 dst)
{
struct btrfs_root *quota_root;
struct btrfs_qgroup *parent;
struct btrfs_qgroup *member;
int ret = 0;

mutex_lock(&fs_info->qgroup_ioctl_lock);
Expand All @@ -962,6 +964,12 @@ int btrfs_add_qgroup_relation(struct btrfs_trans_handle *trans,
ret = -EINVAL;
goto out;
}
member = find_qgroup_rb(fs_info, src);
parent = find_qgroup_rb(fs_info, dst);
if (!member || !parent) {
ret = -EINVAL;
goto out;
}

ret = add_qgroup_relation_item(trans, quota_root, src, dst);
if (ret)
Expand Down

0 comments on commit 6a78a31

Please sign in to comment.