]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
kqueue: If opening a file fails with ESTALE, don't log an error. It probably
authorTimo Sirainen <tss@iki.fi>
Fri, 16 May 2008 22:12:34 +0000 (01:12 +0300)
committerTimo Sirainen <tss@iki.fi>
Fri, 16 May 2008 22:12:34 +0000 (01:12 +0300)
just means the file was deleted by another NFS client.

--HG--
branch : HEAD

src/lib/ioloop-notify-kqueue.c

index ea34eb4bb3341e32d4b6247da5ced0dc7f372fa9..0477bd56edb4f9749a31b7eaf96cdc7ca23026a6 100644 (file)
@@ -118,7 +118,9 @@ enum io_notify_result io_add_notify(const char *path, io_callback_t *callback,
 
        fd = open(path, O_RDONLY);
        if (fd == -1) {
-               if (errno != ENOENT)
+               /* ESTALE could happen with NFS. Don't bother giving an error
+                  message then. */
+               if (errno != ENOENT && errno != ESTALE)
                        i_error("open(%s) for kq notify failed: %m", path);
                return IO_NOTIFY_NOTFOUND;
        }