dovecot-1.2: fdatasync_path(): Ignore EINVAL errors (Linux+CIFS).
dovecot at dovecot.org
dovecot at dovecot.org
Mon Mar 2 18:32:51 EET 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/ebfcfa35b4f4
changeset: 8795:ebfcfa35b4f4
user: Timo Sirainen <tss at iki.fi>
date: Mon Mar 02 11:32:46 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 4204a706dc9b -r ebfcfa35b4f4 src/lib/fdatasync-path.c
--- a/src/lib/fdatasync-path.c Fri Feb 27 17:39:48 2009 -0500
+++ b/src/lib/fdatasync-path.c Mon Mar 02 11:32:46 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