Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361356
b: refs/heads/master
c: 720f1e2
h: refs/heads/master
v: v3
  • Loading branch information
Wang Shilong authored and Chris Mason committed Mar 14, 2013
1 parent 3ce7436 commit 68dd025
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 492104c866cb1b62a11393adccb477f5cd2c7768
refs/heads/master: 720f1e2060138855b4a1b1e8aa642f9c7feb6750
10 changes: 6 additions & 4 deletions trunk/fs/btrfs/qgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1525,21 +1525,23 @@ int btrfs_qgroup_reserve(struct btrfs_root *root, u64 num_bytes)

if ((qg->lim_flags & BTRFS_QGROUP_LIMIT_MAX_RFER) &&
qg->reserved + qg->rfer + num_bytes >
qg->max_rfer)
qg->max_rfer) {
ret = -EDQUOT;
goto out;
}

if ((qg->lim_flags & BTRFS_QGROUP_LIMIT_MAX_EXCL) &&
qg->reserved + qg->excl + num_bytes >
qg->max_excl)
qg->max_excl) {
ret = -EDQUOT;
goto out;
}

list_for_each_entry(glist, &qg->groups, next_group) {
ulist_add(ulist, glist->group->qgroupid,
(uintptr_t)glist->group, GFP_ATOMIC);
}
}
if (ret)
goto out;

/*
* no limits exceeded, now record the reservation into all qgroups
Expand Down

0 comments on commit 68dd025

Please sign in to comment.