upas/fs: fix infinite loop in putcache

Force the cacheclear operation in the LRU cache trimming loop in order
to guarantee that the cache becomes smaller with each iteration.

Without the force flag cacheclear is a no-op for mailboxes that do not
provide a fetch function, e.g. POP3.
This commit is contained in:
Alex Musolino 2018-12-12 12:48:53 +10:30
parent ca851bbb5e
commit b836802fe6

View file

@ -100,7 +100,7 @@ putcache(Mailbox *mb, Message *m)
return;
addlru(mb, mb->lru);
}
cachefree(mb, mb->lru, 0);
cachefree(mb, mb->lru, 1);
}
}