From: Vivek Goyal <vgoyal@redhat.com>
To: virtio-fs@redhat.com
Subject: [Virtio-fs] [PATCH 2/4] virtiofsd: Use macros for write_flag parsing
Date: Tue, 13 Aug 2019 15:29:42 -0400 [thread overview]
Message-ID: <20190813192944.26009-3-vgoyal@redhat.com> (raw)
In-Reply-To: <20190813192944.26009-1-vgoyal@redhat.com>
Use macros instead of hard coded bit positions.
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
---
contrib/virtiofsd/fuse_lowlevel.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/virtiofsd/fuse_lowlevel.c b/contrib/virtiofsd/fuse_lowlevel.c
index 8d3f141d23..417f99e8dc 100644
--- a/contrib/virtiofsd/fuse_lowlevel.c
+++ b/contrib/virtiofsd/fuse_lowlevel.c
@@ -1161,7 +1161,7 @@ static void do_write(fuse_req_t req, fuse_ino_t nodeid,
memset(&fi, 0, sizeof(fi));
fi.fh = arg->fh;
- fi.writepage = (arg->write_flags & 1) != 0;
+ fi.writepage = (arg->write_flags & FUSE_WRITE_CACHE) != 0;
if (!compat) {
fi.lock_owner = arg->lock_owner;
@@ -1208,7 +1208,7 @@ static void do_write_buf(fuse_req_t req, fuse_ino_t nodeid,
}
fi.fh = arg->fh;
- fi.writepage = arg->write_flags & 1;
+ fi.writepage = !!(arg->write_flags & FUSE_WRITE_CACHE);
if (ibufv->count == 1) {
assert(!(tmpbufv.buf[0].flags & FUSE_BUF_IS_FD));
--
2.17.2
next prev parent reply other threads:[~2019-08-13 19:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-13 19:29 [Virtio-fs] [PATCH 0/4] Drop CAP_FSETID if client needs to kill setuid/setgid bits Vivek Goyal
2019-08-13 19:29 ` [Virtio-fs] [PATCH 1/4] virtiofsd: Fix number of padding bits in fuse_file_info Vivek Goyal
2019-08-14 8:54 ` Dr. David Alan Gilbert
2019-08-21 11:25 ` Dr. David Alan Gilbert
2019-08-13 19:29 ` Vivek Goyal [this message]
2019-08-14 9:13 ` [Virtio-fs] [PATCH 2/4] virtiofsd: Use macros for write_flag parsing Dr. David Alan Gilbert
2019-08-13 19:29 ` [Virtio-fs] [PATCH 3/4] virtiofsd: Parse flag FUSE_WRITE_KILL_PRIV Vivek Goyal
2019-08-14 9:28 ` Dr. David Alan Gilbert
2019-08-13 19:29 ` [Virtio-fs] [PATCH 4/4] virtiofsd: Drop CAP_FSETID if client asked for it Vivek Goyal
2019-08-14 9:52 ` Dr. David Alan Gilbert
2019-08-14 12:43 ` Vivek Goyal
2019-08-14 13:17 ` Dr. David Alan Gilbert
2019-08-14 9:55 ` [Virtio-fs] [PATCH 0/4] Drop CAP_FSETID if client needs to kill setuid/setgid bits Dr. David Alan Gilbert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190813192944.26009-3-vgoyal@redhat.com \
--to=vgoyal@redhat.com \
--cc=virtio-fs@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.