mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
If quotacheck or edquota reset the block or inode grace time for
a user or group, when the kernel first sees this, it will update the grace time value. However, it never flags the quota as modified and the updated value never makes it to the quota data file unless the user actually makes some other change that would write the data out. Fixed to flag the quota as modified if the soft limit has actually been reached and should be now enforced.
This commit is contained in:
parent
6ae9968c9a
commit
522883b87f
1 changed files with 10 additions and 2 deletions
|
|
@ -987,10 +987,18 @@ dqget(vp, id, ump, type, dqp)
|
|||
dq->dq_ihardlimit == 0 && dq->dq_bhardlimit == 0)
|
||||
dq->dq_flags |= DQ_FAKE;
|
||||
if (dq->dq_id != 0) {
|
||||
if (dq->dq_btime == 0)
|
||||
if (dq->dq_btime == 0) {
|
||||
dq->dq_btime = time_second + ump->um_btime[type];
|
||||
if (dq->dq_itime == 0)
|
||||
if (dq->dq_bsoftlimit &&
|
||||
dq->dq_curblocks >= dq->dq_bsoftlimit)
|
||||
dq->dq_flags |= DQ_MOD;
|
||||
}
|
||||
if (dq->dq_itime == 0) {
|
||||
dq->dq_itime = time_second + ump->um_itime[type];
|
||||
if (dq->dq_isoftlimit &&
|
||||
dq->dq_curinodes >= dq->dq_isoftlimit)
|
||||
dq->dq_flags |= DQ_MOD;
|
||||
}
|
||||
}
|
||||
*dqp = dq;
|
||||
return (0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue