changeset 6818:f637a8a1aae7 HEAD

Don't disable inotify when seeing ESTALE errors.
author Timo Sirainen <tss@iki.fi>
date Fri, 16 Nov 2007 05:20:48 +0200
parents 766250fcedd8
children 256725979152
files src/lib/ioloop-notify-inotify.c
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/ioloop-notify-inotify.c	Fri Nov 16 05:20:31 2007 +0200
+++ b/src/lib/ioloop-notify-inotify.c	Fri Nov 16 05:20:48 2007 +0200
@@ -101,13 +101,11 @@
 			       IN_CREATE | IN_DELETE | IN_DELETE_SELF |
 			       IN_MOVE | IN_CLOSE | IN_MODIFY);
 	if (wd < 0) {
-		if (errno == ENOENT)
+		/* ESTALE could happen with NFS. Don't bother giving an error
+		   message then. */
+		if (errno == ENOENT || errno == ESTALE)
 			return IO_NOTIFY_NOTFOUND;
 
-		/* ESTALE could happen with NFS. Don't bother giving an error
-		   message then. */
-		if (errno != ESTALE)
-			i_error("inotify_add_watch(%s) failed: %m", path);
 		ctx->disabled = TRUE;
 		return IO_NOTIFY_DISABLED;
 	}