[PATCH] Minor fix of inequalities in the quota code

From: Jan Kara
Date: Thu Nov 18 2004 - 06:32:44 EST


Hello!

Attached is a patch which changes inequalities checking whether user got
below the softlimit to match the ones deciding whether he exceeded them.
IMO it makes more sence if the inequalities match.. The patch is against
2.6.10-rc2-mm1 but should apply well against any recent kernel. Please
apply.

Honza

--
Jan Kara <jack@xxxxxxx>
SuSE CR Labs
Change inequalities for deciding when a user has cleaned up enough space
to be below softlimit to match the ones for deciding when the softlimit
has been exceeded.

Signed-off-by: Jan Kara <jack@xxxxxxx>

diff -rupNX /home/jack/.kerndiffexclude linux-2.6.10-rc2-mm1/fs/dquot.c linux-2.6.10-rc2-mm1-1-eqfix/fs/dquot.c
--- linux-2.6.10-rc2-mm1/fs/dquot.c 2004-11-16 16:39:07.000000000 +0100
+++ linux-2.6.10-rc2-mm1-1-eqfix/fs/dquot.c 2004-11-16 16:46:54.000000000 +0100
@@ -758,7 +758,7 @@ static inline void dquot_decr_inodes(str
dquot->dq_dqb.dqb_curinodes -= number;
else
dquot->dq_dqb.dqb_curinodes = 0;
- if (dquot->dq_dqb.dqb_curinodes < dquot->dq_dqb.dqb_isoftlimit)
+ if (dquot->dq_dqb.dqb_curinodes <= dquot->dq_dqb.dqb_isoftlimit)
dquot->dq_dqb.dqb_itime = (time_t) 0;
clear_bit(DQ_INODES_B, &dquot->dq_flags);
}
@@ -769,7 +769,7 @@ static inline void dquot_decr_space(stru
dquot->dq_dqb.dqb_curspace -= number;
else
dquot->dq_dqb.dqb_curspace = 0;
- if (toqb(dquot->dq_dqb.dqb_curspace) < dquot->dq_dqb.dqb_bsoftlimit)
+ if (toqb(dquot->dq_dqb.dqb_curspace) <= dquot->dq_dqb.dqb_bsoftlimit)
dquot->dq_dqb.dqb_btime = (time_t) 0;
clear_bit(DQ_BLKS_B, &dquot->dq_flags);
}