lkml.org 
[lkml]   [2004]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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);
}
\
 
 \ /
  Last update: 2005-03-22 14:08    [W:0.030 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site