Mercurial > dovecot > original-hg > dovecot-1.2
changeset 6928:fe777302d928 HEAD
NFS attribute cache flushing fix
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 04 Dec 2007 14:39:32 +0200 |
parents | 9a11ee1c7912 |
children | 8c80093fbab4 |
files | src/lib-index/mail-transaction-log-file.c |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-transaction-log-file.c Tue Dec 04 14:31:55 2007 +0200 +++ b/src/lib-index/mail-transaction-log-file.c Tue Dec 04 14:39:32 2007 +0200 @@ -921,8 +921,14 @@ that we really should have read more, flush the cache and try again. if file is locked, the attribute cache was already flushed when refreshing the log. */ - if (file->log->index->nfs_flush && nfs_flush) - nfs_flush_attr_cache_fd_locked(file->filepath, file->fd); + if (file->log->index->nfs_flush && nfs_flush) { + if (!file->locked) + nfs_flush_attr_cache_unlocked(file->filepath); + else { + nfs_flush_attr_cache_fd_locked(file->filepath, + file->fd); + } + } if (file->buffer != NULL && file->buffer_offset > start_offset) { /* we have to insert missing data to beginning of buffer */