Messages in this thread Patch in this message | | | Date | Thu, 18 Nov 2004 12:31:34 +0100 | From | Jan Kara <> | Subject | [PATCH] Minor fix of inequalities in the quota code |
| |
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@suse.cz> 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@suse.cz>
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); } | |