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.
This commit is contained in:
cinap_lenrek 2017-09-23 17:33:05 +02:00
parent 546046b46b
commit b8d4c6ff17

View file

@ -100,6 +100,7 @@ putcache(Mailbox *mb, Message *m)
{
int n;
while(!Topmsg(mb, m)) m = m->whole;
addlru(mb, m);
while(mb->lru != nil && (mb->cached > cachetarg || mb->nlru > 10)){
n = 0;