ref: d81af56add73afff5e1763b5ed42249d82a4f7b4
parent: 5d7a99f444cd7aa53e3f81f862b865fd6becde46
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Sep 23 13:33:05 EDT 2017
upas/fs: fix putcache(), sub-part messages should never go into the lru we accidentally added non-top messages (attatchments) to the lru, resulting in attachments to be freed. this is wrong.
--- a/sys/src/cmd/upas/fs/cache.c
+++ b/sys/src/cmd/upas/fs/cache.c
@@ -100,6 +100,7 @@
{int n;
+ while(!Topmsg(mb, m)) m = m->whole;
addlru(mb, m);
while(mb->lru != nil && (mb->cached > cachetarg || mb->nlru > 10)){n = 0;
--
⑨