From: Timo Sirainen Date: Mon, 2 Mar 2009 16:32:46 +0000 (-0500) Subject: fdatasync_path(): Ignore EINVAL errors (Linux+CIFS). X-Git-Tag: 1.2.beta2~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=847db5fdd70f77ba19d887e64a0e91a8306853ce;p=thirdparty%2Fdovecot%2Fcore.git fdatasync_path(): Ignore EINVAL errors (Linux+CIFS). --HG-- branch : HEAD --- diff --git a/src/lib/fdatasync-path.c b/src/lib/fdatasync-path.c index 51460a7479..11c658f63f 100644 --- a/src/lib/fdatasync-path.c +++ b/src/lib/fdatasync-path.c @@ -16,9 +16,12 @@ int fdatasync_path(const char *path) if (fd == -1) return -1; if (fdatasync(fd) < 0) { + /* Some OSes/FSes don't allow fsyncing directores. Silently + ignore the problem. */ if (errno == EBADF) { - /* At least NetBSD doesn't allow fsyncing directories. - Silently ignore the problem. */ + /* e.g. NetBSD */ + } else if (errno == EINVAL) { + /* e.g. Linux+CIFS */ } else { ret = -1; }