dovecot: Flush NFS attribute cache before stat()ing files.
dovecot at dovecot.org
dovecot at dovecot.org
Fri Jul 13 00:18:32 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/2bc25f61431f
changeset: 5971:2bc25f61431f
user: Timo Sirainen <tss at iki.fi>
date: Thu Jul 12 23:54:34 2007 +0300
description:
Flush NFS attribute cache before stat()ing files.
diffstat:
1 file changed, 2 insertions(+)
src/lib/file-dotlock.c | 2 ++
diffs (19 lines):
diff -r a290b84d144a -r 2bc25f61431f src/lib/file-dotlock.c
--- a/src/lib/file-dotlock.c Thu Jul 12 23:54:13 2007 +0300
+++ b/src/lib/file-dotlock.c Thu Jul 12 23:54:34 2007 +0300
@@ -149,6 +149,7 @@ static int update_lock_info(time_t now,
{
struct stat st;
+ nfs_flush_attr_cache(lock_info->lock_path);
if (nfs_safe_lstat(lock_info->lock_path, &st) < 0) {
if (errno != ENOENT) {
i_error("lstat(%s) failed: %m", lock_info->lock_path);
@@ -232,6 +233,7 @@ static int check_lock(time_t now, struct
/* possibly stale lock file. check also the timestamp of the
file we're protecting. */
+ nfs_flush_attr_cache(lock_info->path);
if (nfs_safe_stat(lock_info->path, &st) < 0) {
if (errno == ENOENT) {
/* file doesn't exist. treat it as if
More information about the dovecot-cvs
mailing list