]> git.baikalelectronics.ru Git - kernel.git/commitdiff
fuse: Remove the control interface for virtio-fs
authorXie Yongji <xieyongji@bytedance.com>
Mon, 18 Jul 2022 08:50:12 +0000 (16:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:18:05 +0000 (11:18 +0200)
[ Upstream commit 02850a869e1c347be236917749b772ee920d2c89 ]

The commit cf6e9b4a2993 ("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: cf6e9b4a2993 ("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>
fs/fuse/control.c

index c23f6f243ad4224c8f9f5c2e1a8466a32ebf99c6..2742d74cedda8f97d609b0d67d9b3e427b385c32 100644 (file)
@@ -265,7 +265,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;
@@ -303,7 +303,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--) {