From b836802fe6c1327bc1947a560741f26aac6a7711 Mon Sep 17 00:00:00 2001 From: Alex Musolino Date: Wed, 12 Dec 2018 12:48:53 +1030 Subject: [PATCH] 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. --- sys/src/cmd/upas/fs/cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/src/cmd/upas/fs/cache.c b/sys/src/cmd/upas/fs/cache.c index 2328859dc..5382d08b0 100644 --- a/sys/src/cmd/upas/fs/cache.c +++ b/sys/src/cmd/upas/fs/cache.c @@ -100,7 +100,7 @@ putcache(Mailbox *mb, Message *m) return; addlru(mb, mb->lru); } - cachefree(mb, mb->lru, 0); + cachefree(mb, mb->lru, 1); } }