fuse: Remove the control interface for virtio-fs
authorXie Yongji <xieyongji@bytedance.com>
Mon, 18 Jul 2022 08:50:12 +0000 (16:50 +0800)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 21 Jul 2022 14:06:19 +0000 (16:06 +0200)
The commit 15c8e72e88e0 ("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: 15c8e72e88e0 ("fuse: allow skipping control interface and forced unmount")
Signed-off-by: Xie Yongji <xieyongji@bytedance.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/control.c

index 7cede9a3bc9623d75641f168c6b3d4eef80a6c66..247ef4f767612ab6644300c03a97ec98cddb8489 100644 (file)
@@ -258,7 +258,7 @@ int fuse_ctl_add_conn(struct fuse_conn *fc)
        struct dentry *parent;
        char name[32];
 
-       if (!fuse_control_sb)
+       if (!fuse_control_sb || fc->no_control)
                return 0;
 
        parent = fuse_control_sb->s_root;
@@ -296,7 +296,7 @@ void fuse_ctl_remove_conn(struct fuse_conn *fc)
 {
        int i;
 
-       if (!fuse_control_sb)
+       if (!fuse_control_sb || fc->no_control)
                return;
 
        for (i = fc->ctl_ndents - 1; i >= 0; i--) {