From: Chengguang Xu <cgxu519@mykernel.net>
To: jack@suse.com
Cc: linux-kernel@vger.kernel.org, Chengguang Xu <cgxu519@mykernel.net>
Subject: [PATCH] quota: remove unnecessary check in dquot_add_inodes() and dquot_add_space()
Date: Sun, 17 Nov 2019 21:20:28 +0800 [thread overview]
Message-ID: <20191117132028.19564-1-cgxu519@mykernel.net> (raw)
After passed grace time we treat softlimit as hardlimit,
so we don't have to compare desire usage with softlimit
in this place.
Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>
---
fs/quota/dquot.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index 6e826b454082..97740077afac 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -1283,7 +1283,6 @@ static int dquot_add_inodes(struct dquot *dquot, qsize_t inodes,
}
if (dquot->dq_dqb.dqb_isoftlimit &&
- newinodes > dquot->dq_dqb.dqb_isoftlimit &&
dquot->dq_dqb.dqb_itime &&
ktime_get_real_seconds() >= dquot->dq_dqb.dqb_itime &&
!ignore_hardlimit(dquot)) {
@@ -1333,7 +1332,6 @@ static int dquot_add_space(struct dquot *dquot, qsize_t space,
}
if (dquot->dq_dqb.dqb_bsoftlimit &&
- tspace > dquot->dq_dqb.dqb_bsoftlimit &&
dquot->dq_dqb.dqb_btime &&
ktime_get_real_seconds() >= dquot->dq_dqb.dqb_btime &&
!ignore_hardlimit(dquot)) {
--
2.21.0
next reply other threads:[~2019-11-17 13:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-17 13:20 Chengguang Xu [this message]
2019-11-19 16:03 ` [PATCH] quota: remove unnecessary check in dquot_add_inodes() and dquot_add_space() Jan Kara
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=20191117132028.19564-1-cgxu519@mykernel.net \
--to=cgxu519@mykernel.net \
--cc=jack@suse.com \
--cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).