upas/fs: allow msgincref() with mb->refs == 0

this can happen when the on the final sync when the mailbox
is being freed:

freembox -> mboxdecref -> syncmbox -> wridxfile -> pridx -> insurecache -> msgincref
This commit is contained in:
cinap_lenrek 2018-11-22 08:49:41 +01:00
parent 1dcf853fc0
commit 5a5d3e0414

View file

@ -1124,7 +1124,7 @@ flagmessages(int argc, char **argv)
void
msgincref(Mailbox *mb, Message *m)
{
assert(mb->refs > 0);
assert(mb->refs >= 0);
for(;; m = m->whole){
assert(m->refs >= 0);
m->refs++;