mail_index_modseq_sync_map_replaced(ctx->modseq_ctx);
}
-static void
+static struct mail_index_map *
mail_index_sync_move_to_private_memory(struct mail_index_sync_map_ctx *ctx)
{
struct mail_index_map *map = ctx->view->map;
if (!MAIL_INDEX_MAP_IS_IN_MEMORY(ctx->view->map))
mail_index_map_move_to_memory(ctx->view->map);
mail_index_modseq_sync_map_replaced(ctx->modseq_ctx);
+ return map;
}
struct mail_index_map *
/* move to memory. the mapping is written when unlocking so we don't
waste time re-mmap()ing multiple times or waste space growing index
file too large */
- mail_index_sync_move_to_private_memory(ctx);
- map = view->map;
+ map = mail_index_sync_move_to_private_memory(ctx);
if (rec->uid <= map->rec_map->last_appended_uid) {
i_assert(map->hdr.messages_count < map->rec_map->records_count);