dovecot-1.1: fdatasync_path(): Ignore EINVAL errors (Linux+CIFS).
dovecot at dovecot.org
dovecot at dovecot.org
Mon Mar 2 18:32:52 EET 2009
details: http://hg.dovecot.org/dovecot-1.1/rev/71b7c7f8d7a2
changeset: 8179:71b7c7f8d7a2
user: Timo Sirainen <tss at iki.fi>
date: Mon Mar 02 11:32:30 2009 -0500
description:
fdatasync_path(): Ignore EINVAL errors (Linux+CIFS).
diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
src/lib/fdatasync-path.c | 7 +++++--
diffs (18 lines):
diff -r f831d12187d1 -r 71b7c7f8d7a2 src/lib/fdatasync-path.c
--- a/src/lib/fdatasync-path.c Fri Feb 27 17:39:22 2009 -0500
+++ b/src/lib/fdatasync-path.c Mon Mar 02 11:32:30 2009 -0500
@@ -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;
}
More information about the dovecot-cvs
mailing list