diff options
author | Vivek Goyal <vgoyal@redhat.com> | 2019-08-13 15:29:42 -0400 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2020-01-23 16:41:37 +0000 |
commit | f779bc5265e7e7abb13a03d4bfbc74151afc15c2 (patch) | |
tree | e3ff785ef09d7d6ec52f785dde8d53539ccf3e10 /tools/virtiofsd/fuse_lowlevel.c | |
parent | 4f8bde99c175ffd86b5125098a4707d43f5e80c6 (diff) |
virtiofsd: Parse flag FUSE_WRITE_KILL_PRIV
Caller can set FUSE_WRITE_KILL_PRIV in write_flags. Parse it and pass it
to the filesystem.
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Reviewed-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
Reviewed-by: Sergio Lopez <slp@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'tools/virtiofsd/fuse_lowlevel.c')
-rw-r--r-- | tools/virtiofsd/fuse_lowlevel.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/virtiofsd/fuse_lowlevel.c b/tools/virtiofsd/fuse_lowlevel.c index 02e1d83038..2d6dc5a680 100644 --- a/tools/virtiofsd/fuse_lowlevel.c +++ b/tools/virtiofsd/fuse_lowlevel.c @@ -1142,6 +1142,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 & FUSE_WRITE_CACHE) != 0; + fi.kill_priv = !!(arg->write_flags & FUSE_WRITE_KILL_PRIV); fi.lock_owner = arg->lock_owner; fi.flags = arg->flags; @@ -1177,7 +1178,8 @@ static void do_write_buf(fuse_req_t req, fuse_ino_t nodeid, fi.lock_owner = arg->lock_owner; fi.flags = arg->flags; fi.fh = arg->fh; - fi.writepage = arg->write_flags & FUSE_WRITE_CACHE; + fi.writepage = !!(arg->write_flags & FUSE_WRITE_CACHE); + fi.kill_priv = !!(arg->write_flags & FUSE_WRITE_KILL_PRIV); if (ibufv->count == 1) { assert(!(tmpbufv.buf[0].flags & FUSE_BUF_IS_FD)); |