ref: 5a5d3e0414f733c69fb43399972a81d465c08555
parent: 1dcf853fc0439e7726d3a3f10678b1340b3592e5
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu Nov 22 03:49:41 EST 2018
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
--- a/sys/src/cmd/upas/fs/mbox.c
+++ b/sys/src/cmd/upas/fs/mbox.c
@@ -1124,7 +1124,7 @@
void
msgincref(Mailbox *mb, Message *m)
{
- assert(mb->refs > 0);
+ assert(mb->refs >= 0);
for(;; m = m->whole){
assert(m->refs >= 0);
m->refs++;