]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
fdatasync_path(): Ignore EINVAL errors (Linux+CIFS).
authorTimo Sirainen <tss@iki.fi>
Mon, 2 Mar 2009 16:32:46 +0000 (11:32 -0500)
committerTimo Sirainen <tss@iki.fi>
Mon, 2 Mar 2009 16:32:46 +0000 (11:32 -0500)
--HG--
branch : HEAD

src/lib/fdatasync-path.c

index 51460a747999e80094b88c86413c3cc92f631b90..11c658f63f04fcc71b591cc082851cfee3a83f6a 100644 (file)
@@ -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;
                }