Index: /trunk/src/VBox/Runtime/r3/posix/dir-posix.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/posix/dir-posix.cpp	(revision 60611)
+++ /trunk/src/VBox/Runtime/r3/posix/dir-posix.cpp	(revision 60612)
@@ -184,5 +184,14 @@
             rc = VINF_SUCCESS;
         else
-            rc = RTErrConvertFromErrno(errno);
+        {
+            /* Linux fsync(2) man page documents both errors as an indication
+             * that the file descriptor can't be flushed (seen EINVAL for usual
+             * directories on CIFS). BSD (OS X) fsync(2) documents only the
+             * latter, and Solaris fsync(3C) pretends there is no problem. */
+            if (errno == EROFS || errno == EINVAL)
+                rc = VERR_NOT_SUPPORTED;
+            else
+                rc = RTErrConvertFromErrno(errno);
+        }
         close(fd);
     }
