Paul Gofman : ntdll: Also call fsync() for FD_TYPE_CHAR in NtFlushBuffersFile().

Alexandre Julliard julliard at winehq.org
Tue Jun 23 15:52:53 CDT 2020


Module: wine
Branch: master
Commit: 01143089f08c662a75f5af47fc2a8a3f8ae2afd6
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=01143089f08c662a75f5af47fc2a8a3f8ae2afd6

Author: Paul Gofman <pgofman at codeweavers.com>
Date:   Tue Jun 23 12:54:27 2020 +0300

ntdll: Also call fsync() for FD_TYPE_CHAR in NtFlushBuffersFile().

Fixes a regression introduced by
3078f10d43d834b0498358fe0accb565191b7020. Files of FD_TYPE_CHAR
were also flushed by fsync() on server before referenced commit.

Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/unix/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index bf1354f46e..a77cb6d410 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -5720,7 +5720,7 @@ NTSTATUS WINAPI NtFlushBuffersFile( HANDLE handle, IO_STATUS_BLOCK *io )
     if (ret == STATUS_ACCESS_DENIED)
         ret = server_get_unix_fd( handle, FILE_APPEND_DATA, &fd, &needs_close, &type, NULL );
 
-    if (!ret && (type == FD_TYPE_FILE || type == FD_TYPE_DIR))
+    if (!ret && (type == FD_TYPE_FILE || type == FD_TYPE_DIR || type == FD_TYPE_CHAR))
     {
         if (fsync(fd)) ret = errno_to_status( errno );
         io->u.Status    = ret;




More information about the wine-cvs mailing list