Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1858926rwb; Fri, 19 Aug 2022 10:33:39 -0700 (PDT) X-Google-Smtp-Source: AA6agR7+64yxmidW6Qz33b/XrOSlj7XwpEt5gHXDQtlf5UhQK/yPvbjnPjSOGOusNG4HgwfLGT1x X-Received: by 2002:a17:90a:cf92:b0:1fa:c0ed:7e48 with SMTP id i18-20020a17090acf9200b001fac0ed7e48mr12214658pju.113.1660930419642; Fri, 19 Aug 2022 10:33:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930419; cv=none; d=google.com; s=arc-20160816; b=RzAIWd6m5NtFYWi78+NdjLUjtGLz7l+wZMYJTmlPwvObRggctZIH62AhJqauxUs06T H3ghski4+E+qzz+gCXsRefI/OxeDdueG7VkIoNlPy+hfaPM7EhDgsxTupbb3nAh9cx3k YA58ZIymffsp0d8s0ErHe50My9HJ8VMOI4ywPxLzCAU6MSksRrmogQ4VEgPqMMxDwve7 +FOz18rVMRtOylWc7LCqZ85jAaPXQHcmNzYFq/bDJTUQEaFQe+EdUJRNGA7t3QT3GxOl GpecB2fiQ8XzOMwYvl7SJxxwLbp1CGXaSBm0OgqgcXkA5CtbYQIe9IleoD/x9+zV+NHY +hPQ== 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=mNTy4grznLecjOyJOipO3ZkexFluGJzTyS2kM9qAo1s=; b=QtR7A+nGADOpJy+0s9mPVIoXgCdhmUN0o+1/VeYI6KntXV50MO+y64IIuyeAUyTI3I sS/ZLlbcoWatN3EyVMO6uc6Hf1+8tLfUZNW6r5JlauD+8C+JbZPOFwJrzZ2SG8UjminQ ooTutYKvdrWiuERCH/89aL0kKX3x+0ISBw7cKb6Ro53y6cibVHWIkrcAWxPtjJMHUnzm VnOPIb5W3I+M0eoA93R3mMY1KU7/BeagGKXsGWmg3lKiUNpDFqsMsi1J0qYdsId09M0J q55c1XoqiTPGg+YBbH3b+JuzBBRSFf5l6YYZOU5hG75IbUnuRlezAGs/h62tEegUNdr0 aD3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="MQP8YmD/"; 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 j36-20020a63fc24000000b0040dd4d169a3si4513473pgi.858.2022.08.19.10.33.28; Fri, 19 Aug 2022 10:33:39 -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="MQP8YmD/"; 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 S1353682AbiHSQmz (ORCPT + 99 others); Fri, 19 Aug 2022 12:42:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353448AbiHSQkL (ORCPT ); Fri, 19 Aug 2022 12:40:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3381812420F; Fri, 19 Aug 2022 09:08:50 -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 E296661825; Fri, 19 Aug 2022 16:07:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D8679C433C1; Fri, 19 Aug 2022 16:07:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660925274; bh=FSjGEW/rKIhnK/pYE+w8JHxX2GWGcmQAudzXX4aoGf8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MQP8YmD/lRHZawFVdCgjt0YfuW1gh0kzwmDGSxkzYEe90y+ZYTroWaU3EThIiPENP tyAL8uO+VlUSb/XncCd4rB9R35FZoLPzMGoLfKINoz/ohevZokxTwkpl5QFblTz1F3 5lZ2F7VV7UAmTwjumioNSG29M2Ns3ChpZJl1rxFo= 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.10 410/545] fuse: Remove the control interface for virtio-fs Date: Fri, 19 Aug 2022 17:43:00 +0200 Message-Id: <20220819153847.769646478@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@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 cc7e94d73c6c..24b4d9db231d 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--) { -- 2.35.1