Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH] Fixing quota error when removing files from a limit exceeded subvols
@ 2015-01-01 23:48 Khaled Ahmed
  2015-01-03  2:09 ` Dongsheng Yang
  0 siblings, 1 reply; 4+ messages in thread
From: Khaled Ahmed @ 2015-01-01 23:48 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Khaled Ahmed

Signed-off-by: Khaled Ahmed <khaled.gnu@gmail.com>
---
 fs/btrfs/qgroup.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index 48b60db..b85200d 100644
--- a/fs/btrfs/qgroup.c
+++ b/fs/btrfs/qgroup.c
@@ -2408,14 +2408,14 @@ int btrfs_qgroup_reserve(struct btrfs_root *root, u64 num_bytes)
 
 		if ((qg->lim_flags & BTRFS_QGROUP_LIMIT_MAX_RFER) &&
 		    qg->reserved + (s64)qg->rfer + num_bytes >
-		    qg->max_rfer) {
+		    qg->max_rfer - 1 ) {
 			ret = -EDQUOT;
 			goto out;
 		}
 
 		if ((qg->lim_flags & BTRFS_QGROUP_LIMIT_MAX_EXCL) &&
 		    qg->reserved + (s64)qg->excl + num_bytes >
-		    qg->max_excl) {
+		    qg->max_excl - 1) {
 			ret = -EDQUOT;
 			goto out;
 		}
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-04 10:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-01 23:48 [PATCH] Fixing quota error when removing files from a limit exceeded subvols Khaled Ahmed
2015-01-03  2:09 ` Dongsheng Yang
2015-01-03 14:29   ` Khaled Ahmed
2015-01-04 10:54     ` Dongsheng Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox