fuse: Remove the control interface for virtio-fs

[ Upstream commit c64797809a64c73497082aa05e401a062ec1af34 ]

The commit 15c8e72e88 ("fuse: allow skipping control interface and forced
unmount") tries to remove the control interface for virtio-fs since it does
not support aborting requests which are being processed. But it doesn't
work now.

This patch fixes it by skipping creating the control interface if
fuse_conn->no_control is set.

Fixes: 15c8e72e88 ("fuse: allow skipping control interface and forced unmount")
Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Xie Yongji 2022-07-18 16:50:12 +08:00 committed by Greg Kroah-Hartman
parent 0839846274
commit bb1cc434df

View File

@ -265,7 +265,7 @@ int fuse_ctl_add_conn(struct fuse_conn *fc)
struct dentry *parent; struct dentry *parent;
char name[32]; char name[32];
if (!fuse_control_sb) if (!fuse_control_sb || fc->no_control)
return 0; return 0;
parent = fuse_control_sb->s_root; parent = fuse_control_sb->s_root;
@ -303,7 +303,7 @@ void fuse_ctl_remove_conn(struct fuse_conn *fc)
{ {
int i; int i;
if (!fuse_control_sb) if (!fuse_control_sb || fc->no_control)
return; return;
for (i = fc->ctl_ndents - 1; i >= 0; i--) { for (i = fc->ctl_ndents - 1; i >= 0; i--) {