diff options
| author | Alex Musolino <alex@musolino.id.au> | 2018-12-12 12:48:53 +1030 |
|---|---|---|
| committer | Alex Musolino <alex@musolino.id.au> | 2018-12-12 12:48:53 +1030 |
| commit | b836802fe6c1327bc1947a560741f26aac6a7711 (patch) | |
| tree | 6f21228d06b9c2d4d5c758a615f65c779671d7ef | |
| parent | ca851bbb5e93d6f208d967edd898e7042833889b (diff) | |
| download | plan9front-b836802fe6c1327bc1947a560741f26aac6a7711.tar.xz | |
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.
| -rw-r--r-- | sys/src/cmd/upas/fs/cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); } } |
