]> Git Repo - linux.git/commitdiff
quota: fix condition for resetting time limit in do_set_dqblk()
authorChengguang Xu <[email protected]>
Wed, 24 Jul 2019 05:32:16 +0000 (13:32 +0800)
committerJan Kara <[email protected]>
Wed, 31 Jul 2019 10:04:42 +0000 (12:04 +0200)
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jan Kara <[email protected]>
fs/quota/dquot.c

index be9c471cdbc8c6edc7e6ffbfd0fe33f48684ca37..6e826b454082c4a90233f1f769c8d1eac6d197b8 100644 (file)
@@ -2731,7 +2731,7 @@ static int do_set_dqblk(struct dquot *dquot, struct qc_dqblk *di)
 
        if (check_blim) {
                if (!dm->dqb_bsoftlimit ||
-                   dm->dqb_curspace + dm->dqb_rsvspace < dm->dqb_bsoftlimit) {
+                   dm->dqb_curspace + dm->dqb_rsvspace <= dm->dqb_bsoftlimit) {
                        dm->dqb_btime = 0;
                        clear_bit(DQ_BLKS_B, &dquot->dq_flags);
                } else if (!(di->d_fieldmask & QC_SPC_TIMER))
@@ -2740,7 +2740,7 @@ static int do_set_dqblk(struct dquot *dquot, struct qc_dqblk *di)
        }
        if (check_ilim) {
                if (!dm->dqb_isoftlimit ||
-                   dm->dqb_curinodes < dm->dqb_isoftlimit) {
+                   dm->dqb_curinodes <= dm->dqb_isoftlimit) {
                        dm->dqb_itime = 0;
                        clear_bit(DQ_INODES_B, &dquot->dq_flags);
                } else if (!(di->d_fieldmask & QC_INO_TIMER))
This page took 0.048867 seconds and 4 git commands to generate.