aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2009-01-07 21:07:29 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-08 11:31:01 -0500
commite04a88a920ff36d03641e1b9c01b7960d94209f1 (patch)
tree0c4bc724372953bdcf027eea2daf87bcfd8e4a2f
parent87d1fda5e2ff6527740604a7918fc273b6f9ae13 (diff)
quota: don't set grace time when user isn't above softlimit
do_set_dqblk() allowed SETDQBLK quotactl to set user's grace time even if user was not above his softlimit. This does not make much sence and by coincidence causes quota code to omit softlimit warning when user really exceeds softlimit. This patch makes do_set_dqblk() reset user's grace time if he has not exceeded softlimit. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--fs/dquot.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/dquot.c b/fs/dquot.c
index 61bfff64e5af..48c0571f831d 100644
--- a/fs/dquot.c
+++ b/fs/dquot.c
@@ -2090,10 +2090,12 @@ static int do_set_dqblk(struct dquot *dquot, struct if_dqblk *di)
2090 } 2090 }
2091 if (di->dqb_valid & QIF_BTIME) { 2091 if (di->dqb_valid & QIF_BTIME) {
2092 dm->dqb_btime = di->dqb_btime; 2092 dm->dqb_btime = di->dqb_btime;
2093 check_blim = 1;
2093 __set_bit(DQ_LASTSET_B + QIF_BTIME_B, &dquot->dq_flags); 2094 __set_bit(DQ_LASTSET_B + QIF_BTIME_B, &dquot->dq_flags);
2094 } 2095 }
2095 if (di->dqb_valid & QIF_ITIME) { 2096 if (di->dqb_valid & QIF_ITIME) {
2096 dm->dqb_itime = di->dqb_itime; 2097 dm->dqb_itime = di->dqb_itime;
2098 check_ilim = 1;
2097 __set_bit(DQ_LASTSET_B + QIF_ITIME_B, &dquot->dq_flags); 2099 __set_bit(DQ_LASTSET_B + QIF_ITIME_B, &dquot->dq_flags);
2098 } 2100 }
2099 2101