$OpenBSD: patch-src_lib-index_mail-index-data_c,v 1.1 2003/07/23 06:03:01 jolan Exp $ --- src/lib-index/mail-index-data.c.orig Thu May 29 16:55:58 2003 +++ src/lib-index/mail-index-data.c Tue Jul 15 15:17:26 2003 @@ -133,6 +133,12 @@ static int mmap_update(struct mail_index { struct mail_index_data_header *hdr; + if (data->index->mmap_invalidate && data->mmap_base != NULL) { + if (msync(data->mmap_base, data->mmap_used_length, + MS_SYNC | MS_INVALIDATE) < 0) + return index_data_set_syscall_error(data, "msync()"); + } + if (data->header != NULL && data->header->indexid != data->index->indexid) { if (data->header->indexid != 0) {