Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3094023rwb; Mon, 15 Aug 2022 17:59:13 -0700 (PDT) X-Google-Smtp-Source: AA6agR6drvmceDAwn6qYSE56MZe5tbU5mwx7JqdPItCjNsCeaFvqJfJ3TZ8OEdsvaz5ZtOnURqYm X-Received: by 2002:a17:906:84ef:b0:730:ba33:512b with SMTP id zp15-20020a17090684ef00b00730ba33512bmr11994427ejb.346.1660611553346; Mon, 15 Aug 2022 17:59:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660611553; cv=none; d=google.com; s=arc-20160816; b=AoZW8AmBwDGjlvrwFH0YsG8Gt3HsEvu8KGL07N+P8pQHoiHHh2TAhc5HviKD4IF63w SVxlBy61iendxnAlmFv6mciaeu9ReAqcJduCwgJy1oMEliaH8IA+S7iwGiKbZ7vbLyRs /6DgAEDijevEW75HaKXZEILZsCVN3gI5i1evVM2GGOBUlmL8F6VXNECDESeCefqGuJxo xfsWT2ok0kr16/8i/IE936z7hkGG+z1BVszEW6UMklmIU4Szdv3jAUVCiSuHxwxOxO8e jSKA94NB0fgnZqh7HcdIOlAW2D1Rl7PoT6rODUOFiTzi2dX5Lj29ka05A4XdW4R8a8QN WjfA== 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=0UTa1LFo3yPDZpKw4d9wwJNppRgWPZC20igxFIFxpnh07ELliAEmK074zdd0wKOxJ5 I3eVgAxzcX2s2rAS4xvEwWzNh8RntwL8dk3JVqu5DCEjc7ddBayj78H/cHR5nvGCUxnE DC7ESf6TyUJQHCAjM2NyHHVcnlzNanzQqwJFlHt1YXDET4cPxXDEh8Szo5/yh0u/BN5l E4ZfXFlSn8fM4jS5nyCIPGhpS5zmGlAvPS4YJVmHlPCV6r45ttb8CTUpYEHj4YRfjcX4 RAoIiBsxBjumZydFdwGqQ2yjUTR6444M3km99NLplBydBQOv9fFJmt+lVuLo68l7hhrL xodQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bxEvkxxq; 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 h21-20020a170906111500b007317756bbffsi7778403eja.779.2022.08.15.17.58.47; Mon, 15 Aug 2022 17:59:13 -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=bxEvkxxq; 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 S243055AbiHPAtU (ORCPT + 99 others); Mon, 15 Aug 2022 20:49:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346890AbiHPAps (ORCPT ); Mon, 15 Aug 2022 20:45:48 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3847739B96; Mon, 15 Aug 2022 13:42:13 -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 ams.source.kernel.org (Postfix) with ESMTPS id DEFE8B8113E; Mon, 15 Aug 2022 20:42:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2280BC433D6; Mon, 15 Aug 2022 20:42:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660596130; bh=iLeyVKw30Yurlo2472vxw9O6/4uq54uc70v/ViiSn4M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bxEvkxxq2Bt+7okCal0yYQRDs/IUpaUUnlHTlRlYsJ+IRNgc0CNbhAwuT+NhBW3+5 vliFRxFUDbzjMlfO5QPt7DSGOqVV91TVAsi/i5tTqAeDbsB7mceSXqX1lSNui8BNbs SZleGU7MnYKVWBvKo+EeAVtBYT3wEwT1xoD4tvvw= 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.19 0983/1157] fuse: Remove the control interface for virtio-fs Date: Mon, 15 Aug 2022 20:05:39 +0200 Message-Id: <20220815180519.056755357@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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