From: Xie Yongji Date: Mon, 18 Jul 2022 08:50:12 +0000 (+0800) Subject: fuse: Remove the control interface for virtio-fs X-Git-Tag: baikal/mips/sdk5.9~153 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=b298aec0541106e72486e3e67cc00401db7cfefd;p=kernel.git fuse: Remove the control interface for virtio-fs [ Upstream commit acfc2b9655634211296eed79e71f76407a25d83f ] The commit d150e2068028 ("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: d150e2068028 ("fuse: allow skipping control interface and forced unmount") Signed-off-by: Xie Yongji Signed-off-by: Miklos Szeredi Signed-off-by: Sasha Levin --- diff --git a/fs/fuse/control.c b/fs/fuse/control.c index 000d2e5627e99..79f01d09c78cb 100644 --- a/fs/fuse/control.c +++ b/fs/fuse/control.c @@ -275,7 +275,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; @@ -313,7 +313,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--) {