FROMLIST: Revert "fuse: Apply flags2 only when userspace set the FUSE_INIT_EXT"

This reverts commit 3066ff93476c35679cb07a97cce37d9bb07632ff.

This patch breaks all existing userspace by requiring updates as
mentioned in the commit message, which is not allowed.

Revert to restore compatibility with existing userspace
implementations.

Cc: Bernd Schubert <bschubert@ddn.com>
Cc: Miklos Szeredi <mszeredi@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: André Draszik <andre.draszik@linaro.org>
Test: TH
Bug: 298946207
Link: https://lore.kernel.org/all/20230904133321.104584-1-git@andred.net/
Change-Id: I853761625a57d3259252d5eb695828b35ed40b4d
Signed-off-by: André Draszik <draszik@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
André Draszik 2023-09-04 13:59:12 +01:00 committed by Greg Kroah-Hartman
parent 469cf75fcc
commit f5aa90efe8

View File

@ -1303,10 +1303,7 @@ static void process_init_reply(struct fuse_mount *fm, struct fuse_args *args,
process_init_limits(fc, arg);
if (arg->minor >= 6) {
u64 flags = arg->flags;
if (flags & FUSE_INIT_EXT)
flags |= (u64) arg->flags2 << 32;
u64 flags = arg->flags | (u64) arg->flags2 << 32;
ra_pages = arg->max_readahead / PAGE_SIZE;
if (flags & FUSE_ASYNC_READ)