Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3026636rwb; Mon, 15 Aug 2022 16:24:46 -0700 (PDT) X-Google-Smtp-Source: AA6agR4kQ9JwWOhdtjBTIoSiCyOs1kyWMSf44U8YnkfgzFsH7YFi6SGF0ofY0S6qMb8h4eC6BJjH X-Received: by 2002:a05:6402:2751:b0:443:d90a:43d4 with SMTP id z17-20020a056402275100b00443d90a43d4mr4579588edd.368.1660605886413; Mon, 15 Aug 2022 16:24:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605886; cv=none; d=google.com; s=arc-20160816; b=Y7Li+ppn7vvaR3UplxltxlqSnDvvSpjKO0eO1iaVI3XVxux3t7JucFbn76nOwz12Y9 2OZ/7qpFDkAia5P7x7I4G4yInEd8ic8bJlXfeIokylYajJfbL7j7DMs2uU8u8eCLqJAX i8G5uWZ1lQMWWzeAlY3gXDCOuiXz387lkV5rDj+yVShHW2fXS36hnzbPhERpNBsx3s2o sQO5Tw6TSyOofvL9VHPpTBrA/t4gN3nfZkhI/JwwO9DTBznKUal0+vt3rsHvhyNO5ahT hiKBZsy2a6uq2QFpFiDlX6QekkCrJY0Hrb1jtkT4LVNMvvgX9V5CJgCfDYTmLMqr1IZE 76bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3ESZ8A8kZO/NAXf4g9T7++0fqzDmv+8CwrrMjP3Sqvk=; b=cLQj34/kJDFOkqb5OujzHCEFzQwG/0E8HIJJL688sYW1zZi2M7mLsIw03qQ0LMl16o rLj64Kf/Osk1Fa0fxvC0q6tesvUg2SrKcjqoPzn1d0CG4rJ54beFwJE9gZrlseSI8BKr jOEouONwPXGRlooolKZiax/u5Xool0+Dh61iJoMWIguka5cSx6kSfeABAwOUdI1cqnfn 3Rr3/SOLJgptshAm6ix+2wFps0+fMIL8uGDEi1em4Xi7emkeCDcRvGti2eWPSLfqpWcs oG9u+QUxiOI1Siz82IOTFV1784tRSKMumrhLD8rUamSGjcN/msh9MRIyZon40XSKhVjP LPBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Tr5W+6RL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n19-20020a1709065e1300b0073045295788si7543827eju.533.2022.08.15.16.24.20; Mon, 15 Aug 2022 16:24:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Tr5W+6RL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351943AbiHOWuD (ORCPT + 99 others); Mon, 15 Aug 2022 18:50:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350882AbiHOWpk (ORCPT ); Mon, 15 Aug 2022 18:45:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE92C134217; Mon, 15 Aug 2022 12:52:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 670636122B; Mon, 15 Aug 2022 19:52:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57259C433D6; Mon, 15 Aug 2022 19:52:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660593162; bh=iLeyVKw30Yurlo2472vxw9O6/4uq54uc70v/ViiSn4M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Tr5W+6RLUOve8ganZwyvCpfn209rJUVX2quEC+0B68WxlyQjuxUGK0m6O4Ph8a3vV MKJt88T0yuVbNM3F/xKuadfYcqoC4orTqVSQrvn79xofj2yTka7EL8aCfNTkvRGPn6 lbTjZsNvXr8yU4iNBQdh5NGIl7fuJnOm9cIhIuQk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Xie Yongji , Miklos Szeredi , Sasha Levin Subject: [PATCH 5.18 0905/1095] fuse: Remove the control interface for virtio-fs Date: Mon, 15 Aug 2022 20:05:04 +0200 Message-Id: <20220815180506.738034007@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xie Yongji [ Upstream commit c64797809a64c73497082aa05e401a062ec1af34 ] 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 Signed-off-by: Miklos Szeredi Signed-off-by: Sasha Levin --- fs/fuse/control.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fuse/control.c b/fs/fuse/control.c index 7cede9a3bc96..247ef4f76761 100644 --- a/fs/fuse/control.c +++ b/fs/fuse/control.c @@ -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--) { -- 2.35.1