Quota recalculation opened all mailboxes and got us back to
quota_clone_flush(), which caused another dict transaction to be opened,
which caused a crash with some dict backends.
struct quota_clone_mailbox {
union mailbox_module_context module_ctx;
bool quota_changed;
+ bool quota_flushing;
};
static void quota_clone_flush(struct mailbox *box)
struct quota_clone_mailbox *qbox = QUOTA_CLONE_CONTEXT(box);
qbox->module_ctx.super.close(box);
- if (qbox->quota_changed)
+
+ if (qbox->quota_flushing) {
+ /* recursing back from quota recalculation */
+ } else if (qbox->quota_changed) {
+ qbox->quota_flushing = TRUE;
quota_clone_flush(box);
+ qbox->quota_flushing = FALSE;
+ }
}
static void quota_clone_mailbox_allocated(struct mailbox *box)