summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChengguang Xu <cgxu519@zoho.com.cn>2019-07-24 01:32:16 -0400
committerJan Kara <jack@suse.cz>2019-07-31 06:04:42 -0400
commit4b8e1106dd95d4d7f2781258d3871b445f3928ce (patch)
tree1fe3a2ff1a9eec916bb8c39427c06c0f9004e75b
parentb6aeffc5852f39db6e6e56da5327d0c43ac3c30a (diff)
quota: fix condition for resetting time limit in do_set_dqblk()
We reset time limit when current usage is smaller or equal to soft limit in other place, so follow this rule in do_set_dqblk(). Signed-off-by: Chengguang Xu <cgxu519@zoho.com.cn> Link: https://lore.kernel.org/r/20190724053216.19392-1-cgxu519@zoho.com.cn Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r--fs/quota/dquot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c
index be9c471cdbc8..6e826b454082 100644
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -2731,7 +2731,7 @@ static int do_set_dqblk(struct dquot *dquot, struct qc_dqblk *di)
2731 2731
2732 if (check_blim) { 2732 if (check_blim) {
2733 if (!dm->dqb_bsoftlimit || 2733 if (!dm->dqb_bsoftlimit ||
2734 dm->dqb_curspace + dm->dqb_rsvspace < dm->dqb_bsoftlimit) { 2734 dm->dqb_curspace + dm->dqb_rsvspace <= dm->dqb_bsoftlimit) {
2735 dm->dqb_btime = 0; 2735 dm->dqb_btime = 0;
2736 clear_bit(DQ_BLKS_B, &dquot->dq_flags); 2736 clear_bit(DQ_BLKS_B, &dquot->dq_flags);
2737 } else if (!(di->d_fieldmask & QC_SPC_TIMER)) 2737 } else if (!(di->d_fieldmask & QC_SPC_TIMER))
@@ -2740,7 +2740,7 @@ static int do_set_dqblk(struct dquot *dquot, struct qc_dqblk *di)
2740 } 2740 }
2741 if (check_ilim) { 2741 if (check_ilim) {
2742 if (!dm->dqb_isoftlimit || 2742 if (!dm->dqb_isoftlimit ||
2743 dm->dqb_curinodes < dm->dqb_isoftlimit) { 2743 dm->dqb_curinodes <= dm->dqb_isoftlimit) {
2744 dm->dqb_itime = 0; 2744 dm->dqb_itime = 0;
2745 clear_bit(DQ_INODES_B, &dquot->dq_flags); 2745 clear_bit(DQ_INODES_B, &dquot->dq_flags);
2746 } else if (!(di->d_fieldmask & QC_INO_TIMER)) 2746 } else if (!(di->d_fieldmask & QC_INO_TIMER))