fixed quota delete
This commit is contained in:
parent
88861102fd
commit
3f1752e961
2 changed files with 10 additions and 8 deletions
|
|
@ -42,8 +42,8 @@ func (q *Quota) cleanup() {
|
|||
}
|
||||
q.log.Info("quota usage", "current", atomic.LoadInt64(&q.cur), "max", q.max)
|
||||
defer q.mu.Unlock()
|
||||
size := q.fs.mh.DeleteOldest()
|
||||
atomic.AddInt64(&q.cur, -size)
|
||||
free := q.fs.mh.DeleteOldest()
|
||||
atomic.AddInt64(&q.cur, -free)
|
||||
}
|
||||
|
||||
func (q *Quota) Add(n int) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue