From: Timo Sirainen Date: Mon, 3 May 2004 19:53:07 +0000 (+0300) Subject: fixes for fcntl_locks_disable = yes X-Git-Tag: 1.1.alpha1~4134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=215daa7d5bf9a849849586490fd6fdd28a724dd8;p=thirdparty%2Fdovecot%2Fcore.git fixes for fcntl_locks_disable = yes --HG-- branch : HEAD --- diff --git a/src/lib-index/mail-index-lock.c b/src/lib-index/mail-index-lock.c index e9f5283b28..6cf2d5019d 100644 --- a/src/lib-index/mail-index-lock.c +++ b/src/lib-index/mail-index-lock.c @@ -368,6 +368,7 @@ static void mail_index_excl_unlock_finish(struct mail_index *index) if (index->map != NULL && index->map->write_to_disk) { i_assert(index->log_locked); + index->map->write_to_disk = FALSE; if (index->copy_lock_path != NULL) { /* new mapping replaces the old */ (void)unlink(index->copy_lock_path); diff --git a/src/lib-index/mail-index-sync-update.c b/src/lib-index/mail-index-sync-update.c index 9f460acceb..dc987920ad 100644 --- a/src/lib-index/mail-index-sync-update.c +++ b/src/lib-index/mail-index-sync-update.c @@ -171,7 +171,7 @@ int mail_index_sync_update_index(struct mail_index_sync_ctx *sync_ctx, uint32_t sync_stamp, uint64_t sync_size) { struct mail_index *index = sync_ctx->index; - struct mail_index_map *map = index->map; + struct mail_index_map *map; struct mail_index_update_ctx ctx; struct mail_index_sync_rec rec; const struct mail_index_record *appends; @@ -217,6 +217,7 @@ int mail_index_sync_update_index(struct mail_index_sync_ctx *sync_ctx, if (mail_index_lock_exclusive(index, &lock_id) < 0) return -1; + map = index->map; if (MAIL_INDEX_MAP_IS_IN_MEMORY(map)) map->write_to_disk = TRUE;