Delete FUSE_FSYNC_FDATASYNC
authorNikolaus Rath <Nikolaus@rath.org>
Sat, 6 Apr 2019 16:56:14 +0000 (17:56 +0100)
committerNikolaus Rath <Nikolaus@rath.org>
Sat, 6 Apr 2019 16:56:14 +0000 (17:56 +0100)
This constant is not defined in the kernel, so it will be lost when
fuse_kernel.h is not synchronized. Instead, the kernel just passes a
flag value of "1", so for now we also use a literal in userspace.

include/fuse_kernel.h
lib/fuse_lowlevel.c

index 5d34e566cbbb24a20b5c8a4591a0a6f6ac6e87fa..401c569e6cb108960658d0312cb13435f48b8982 100644 (file)
@@ -339,13 +339,6 @@ struct fuse_file_lock {
  */
 #define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0)
 
-/**
- * Fsync flags
- *
- * FUSE_FSYNC_FDATASYNC: Sync data only, not metadata
- */
-#define FUSE_FSYNC_FDATASYNC   (1 << 0)
-
 enum fuse_opcode {
        FUSE_LOOKUP             = 1,
        FUSE_FORGET             = 2,  /* no reply */
index f5542ccb4ffb2644f31f8756e154c63690e77bee..78ee63bc874b907bc7d7336ae036ae8acab0f1c9 100644 (file)
@@ -1420,7 +1420,7 @@ static void do_fsync(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
 {
        struct fuse_fsync_in *arg = (struct fuse_fsync_in *) inarg;
        struct fuse_file_info fi;
-       int datasync = arg->fsync_flags & FUSE_FSYNC_FDATASYNC;
+       int datasync = arg->fsync_flags & 1;
 
        memset(&fi, 0, sizeof(fi));
        fi.fh = arg->fh;
@@ -1492,7 +1492,7 @@ static void do_fsyncdir(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
 {
        struct fuse_fsync_in *arg = (struct fuse_fsync_in *) inarg;
        struct fuse_file_info fi;
-       int datasync = arg->fsync_flags & FUSE_FSYNC_FDATASYNC;
+       int datasync = arg->fsync_flags & 1;
 
        memset(&fi, 0, sizeof(fi));
        fi.fh = arg->fh;