[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZwktZCHlm1G3Uh9D@sashalap>
Date: Fri, 11 Oct 2024 09:51:32 -0400
From: Sasha Levin <sashal@...nel.org>
To: Miklos Szeredi <miklos@...redi.hu>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Miklos Szeredi <mszeredi@...hat.com>,
Amir Goldstein <amir73il@...il.com>, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH AUTOSEL 6.11 48/76] fuse: allow O_PATH fd for
FUSE_DEV_IOC_BACKING_OPEN
On Mon, Oct 07, 2024 at 12:15:45PM +0200, Miklos Szeredi wrote:
>On Fri, 4 Oct 2024 at 20:19, Sasha Levin <sashal@...nel.org> wrote:
>>
>> From: Miklos Szeredi <mszeredi@...hat.com>
>>
>> [ Upstream commit efad7153bf93db8565128f7567aab1d23e221098 ]
>>
>> Only f_path is used from backing files registered with
>> FUSE_DEV_IOC_BACKING_OPEN, so it makes sense to allow O_PATH descriptors.
>>
>> O_PATH files have an empty f_op, so don't check read_iter/write_iter.
>>
>> Reviewed-by: Amir Goldstein <amir73il@...il.com>
>> Signed-off-by: Miklos Szeredi <mszeredi@...hat.com>
>> Signed-off-by: Sasha Levin <sashal@...nel.org>
>> ---
>> fs/fuse/passthrough.c | 7 ++-----
>> 1 file changed, 2 insertions(+), 5 deletions(-)
>>
>> diff --git a/fs/fuse/passthrough.c b/fs/fuse/passthrough.c
>> index 9666d13884ce5..62aee8289d110 100644
>> --- a/fs/fuse/passthrough.c
>> +++ b/fs/fuse/passthrough.c
>> @@ -228,16 +228,13 @@ int fuse_backing_open(struct fuse_conn *fc, struct fuse_backing_map *map)
>> if (map->flags || map->padding)
>> goto out;
>>
>> - file = fget(map->fd);
>> + file = fget_raw(map->fd);
>> res = -EBADF;
>> if (!file)
>> goto out;
>>
>> - res = -EOPNOTSUPP;
>> - if (!file->f_op->read_iter || !file->f_op->write_iter)
>> - goto out_fput;
>> -
>> backing_sb = file_inode(file)->i_sb;
>> + pr_info("%s: %x:%pD %i\n", __func__, backing_sb->s_dev, file, backing_sb->s_stack_depth);
>
>That's a stray debug line that wasn't in there when I posted the patch
>for review[1], but somehow made it into the pull...
>
>Since this isn't a bug fix, it would be easiest to just drop the patch
>from the stable queues.
>
>But I'm okay with just dropping this stray line from the backport, or
>waiting for an upstream fix which does that.
I'll just drop it, thanks!
--
Thanks,
Sasha
Powered by blists - more mailing lists