From: Timo Sirainen Date: Wed, 16 Nov 2016 11:29:49 +0000 (+0200) Subject: lib-index: Fix flushing NFS if minimum wanted transaction log file is lost X-Git-Tag: 2.3.0.rc1~2617 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=faee566824fe3567c8beacf097f9dcfc0d3761b7;p=thirdparty%2Fdovecot%2Fcore.git lib-index: Fix flushing NFS if minimum wanted transaction log file is lost --- diff --git a/src/lib-index/mail-transaction-log-view.c b/src/lib-index/mail-transaction-log-view.c index b64ace3cd7..296098f66d 100644 --- a/src/lib-index/mail-transaction-log-view.c +++ b/src/lib-index/mail-transaction-log-view.c @@ -156,9 +156,11 @@ int mail_transaction_log_view_set(struct mail_transaction_log_view *view, for (seq = min_file_seq; seq <= max_file_seq; seq++) { if (file == NULL || file->hdr.file_seq != seq) { /* see if we could find the missing file. if we know - the max. file sequence, make sure NFS attribute - cache gets flushed if necessary. */ - bool nfs_flush = max_file_seq != (uint32_t)-1; + the max. file sequence or we don't have the the min. + file, make sure NFS attribute cache gets flushed if + necessary. */ + bool nfs_flush = seq == min_file_seq || + max_file_seq != (uint32_t)-1; ret = mail_transaction_log_find_file(view->log, seq, nfs_flush, &file);