changeset 8795:ebfcfa35b4f4 HEAD

fdatasync_path(): Ignore EINVAL errors (Linux+CIFS).
author Timo Sirainen <tss@iki.fi>
date Mon, 02 Mar 2009 11:32:46 -0500
parents 4204a706dc9b
children 94c815002d84
files src/lib/fdatasync-path.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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 @@
 	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;
 		}