Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Khaled Ahmed <khaled.gnu@gmail.com>
To: linux-btrfs@vger.kernel.org
Cc: Khaled Ahmed <khaled.gnu@gmail.com>
Subject: [PATCH] Fixing quota error when removing files from a limit exceeded subvols
Date: Fri,  2 Jan 2015 01:48:34 +0200	[thread overview]
Message-ID: <1420156114-10849-1-git-send-email-khaled.gnu@gmail.com> (raw)

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


             reply	other threads:[~2015-01-01 23:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-01 23:48 Khaled Ahmed [this message]
2015-01-03  2:09 ` [PATCH] Fixing quota error when removing files from a limit exceeded subvols Dongsheng Yang
2015-01-03 14:29   ` Khaled Ahmed
2015-01-04 10:54     ` Dongsheng Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1420156114-10849-1-git-send-email-khaled.gnu@gmail.com \
    --to=khaled.gnu@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox