[PATCH] Honour CPNIO_DSYNC flag if set.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The CPNIO_DSYNC flag was being ignored (only CPNIO_SYNC was honoured).
This was breaking at least RandomFileAccess when open in "rwd" mode
("rws" would work as expected).

---
 native/jni/java-nio/gnu_java_nio_VMChannel.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/native/jni/java-nio/gnu_java_nio_VMChannel.c b/native/jni/java-nio/gnu_java_nio_VMChannel.c
index 7899f0b..6a1cf48 100644
--- a/native/jni/java-nio/gnu_java_nio_VMChannel.c
+++ b/native/jni/java-nio/gnu_java_nio_VMChannel.c
@@ -1705,7 +1705,8 @@ Java_gnu_java_nio_VMChannel_open (JNIEnv *env,
            | ((mode & CPNIO_APPEND) ? O_APPEND :
               ((nmode == O_WRONLY) ? O_TRUNC : 0))
            | ((mode & CPNIO_EXCL) ? O_EXCL : 0)
-           | ((mode & CPNIO_SYNC) ? O_SYNC : 0));
+           | ((mode & CPNIO_SYNC) ? O_SYNC : 0)
+           | ((mode & CPNIO_DSYNC) ? O_DSYNC : 0));
 
   npath = JCL_jstring_to_cstring (env, path);
 
-- 
1.7.0.4





[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux