diff options
author | André Draszik <draszik@google.com> | 2023-10-26 16:33:27 +0100 |
---|---|---|
committer | André Draszik <draszik@google.com> | 2023-10-27 09:21:22 +0100 |
commit | eda605439118ddf3cba4a2216b1d53b21d630b8e (patch) | |
tree | b06a5e74bcc74f5726f2e0400e6e54ec1df48ea0 | |
parent | dd3d7048e44aa4218ee9609633e6ebd8420a6a20 (diff) | |
download | libfuse-eda605439118ddf3cba4a2216b1d53b21d630b8e.tar.gz |
lowlevel: Set FUSE_INIT_EXT in fuse_init_out::flags as needed
The Linux kernel started requiring this flag to be set when any of
flags2 is set.
See also commit 34a7ad5e9d0f ("Set FUSE_INIT_EXT in
fuse_init_out::flags") in here.
Test: TH
Bug: 298946207
Change-Id: Ie5ce56f653b10f2190159fa0615c79acd5b82747
Signed-off-by: André Draszik <draszik@google.com>
-rw-r--r-- | lib/fuse_lowlevel.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index 4c75e3b..5ebca0d 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -2276,6 +2276,13 @@ void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg) outarg.flags |= FUSE_EXPLICIT_INVAL_DATA; if (se->conn.want & FUSE_CAP_SETXATTR_EXT) outarg.flags |= FUSE_SETXATTR_EXT; + + if (extended_flags) { + if (arg->flags & FUSE_INIT_EXT) { + outarg.flags |= FUSE_INIT_EXT; + } + } + outarg.max_readahead = se->conn.max_readahead; outarg.max_write = se->conn.max_write; if (se->conn.proto_minor >= 13) { |