Mercurial > dovecot > original-hg > dovecot-1.2
changeset 6827:e3af6e0e55ae HEAD
Don't bother flushing attribute cache if we just fcntl locked the file.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 18 Nov 2007 01:45:29 +0200 |
parents | bca08d6f001d |
children | 8470d0845fc2 |
files | src/lib-index/mail-cache.c src/lib-index/mail-index-map.c |
diffstat | 2 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-cache.c Sat Nov 17 08:14:31 2007 +0200 +++ b/src/lib-index/mail-cache.c Sun Nov 18 01:45:29 2007 +0200 @@ -490,7 +490,8 @@ if (ret <= 0) return ret; - if (cache->index->nfs_flush) + if (cache->index->nfs_flush && + cache->index->lock_method != FILE_LOCK_METHOD_FCNTL) nfs_flush_attr_cache_fd(cache->filepath, cache->fd); mail_cache_flush_read_cache(cache, TRUE); return 1;
--- a/src/lib-index/mail-index-map.c Sat Nov 17 08:14:31 2007 +0200 +++ b/src/lib-index/mail-index-map.c Sun Nov 18 01:45:29 2007 +0200 @@ -811,7 +811,7 @@ if (mail_index_lock_shared(index, &lock_id) < 0) return -1; - if (index->nfs_flush) + if (index->nfs_flush && index->lock_method != FILE_LOCK_METHOD_FCNTL) nfs_flush_attr_cache_fd(index->filepath, index->fd); if (fstat(index->fd, &st) == 0)