From 87b907808d5e1d5b86928ec711a0d795201aeeb9 Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Sat, 6 Apr 2019 17:56:14 +0100 Subject: [PATCH] Delete FUSE_FSYNC_FDATASYNC 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 | 7 ------- lib/fuse_lowlevel.c | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/include/fuse_kernel.h b/include/fuse_kernel.h index 5d34e56..401c569 100644 --- a/include/fuse_kernel.h +++ b/include/fuse_kernel.h @@ -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 */ diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index f5542cc..78ee63b 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -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; -- 2.30.2