Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3152209imw; Mon, 18 Jul 2022 03:06:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tR+0vGnKRtj6F+Zbq1HWI61a2fA7GgJvzbOoKEPJMfKlypi0bPjXOpyvhDDlw3e45maeDQ X-Received: by 2002:a17:907:72c6:b0:72f:b01:2723 with SMTP id du6-20020a17090772c600b0072f0b012723mr11344582ejc.439.1658138784545; Mon, 18 Jul 2022 03:06:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658138784; cv=none; d=google.com; s=arc-20160816; b=1ACzriyKvBI+UK7YS2qFoCJa6DqhsFVXHjNA0V+8bMLrvqdbJ7e27PgPRxKJONOgDo khdJxoVbQ9WsktfoUejqctm0LH35n9R9JbbpBK48X2qZzGU4ok1aEULQsHwWh1745O/X 9riGpjugcwvZAOA7rdQEGATTge3WQsAUjdJJUi+LuaDEWX7tcboZKIchXFt1+xGOp2xJ UYXCsK1UhZmtj72g50ggyDgy1uW9vrLAMQI82zpUg9IgsDlxwP/mgOcYxJYP+AB4lANF mpY9n6O5pmGJ92hAOVy+U/6NPTvHdFYatEGjLH+4X7oPZbnC0YFlxIh+3U0JkqCWhDZt bncw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=EUG2Bl6auG4euKWbKCVfTQIsL72qesYuYx+oA0TLXYA=; b=G5nowfxpISmTBkvLFw52HqZzDHGNZkp4L8iMT8B9ceTzjKRFHoTfTJaKa273C6qdAu ZA35nGuL6pD2VpLAaqaY3cnxzNObwYpCnSZ3I7Rz2a7BKUYi1jON32hIgW1Eyegp+T90 v3PsOMnEqsweZVRstbP0axMvX8fsl3jP4u+Z27ncjQhkHEG9swz2vHYPVMhC9Q2kD3rD /Z09is7/881SgN57LFTnpwQzw6e8fnFK1CTusPQg+uOmIHHES0ST2zlsn17aPPZlDjRF RZsf4brW93d+41UkiWz68Z7GEcqXehx7J7PJvFNfGI/sU2gm78B0oj6upEBQwxwBEl3M 1ojw== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=cg5+u12e; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d25-20020a056402401900b00435c2425755si8268998eda.103.2022.07.18.03.05.59; Mon, 18 Jul 2022 03:06:24 -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=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=cg5+u12e; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234270AbiGRJ4g (ORCPT + 99 others); Mon, 18 Jul 2022 05:56:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45970 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233561AbiGRJ4b (ORCPT ); Mon, 18 Jul 2022 05:56:31 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0D0A1A068 for ; Mon, 18 Jul 2022 02:56:29 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id g1so14477686edb.12 for ; Mon, 18 Jul 2022 02:56:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EUG2Bl6auG4euKWbKCVfTQIsL72qesYuYx+oA0TLXYA=; b=cg5+u12elLlpSxw3zBnGpBIdLV4ULJ+lK4j7a2Vev65lyzIlATOSd8n5BjaNPJVE+Z Ro3kg6lD3KBtLbjuyrfp3MwPHJ6Nf2i2nIZ1XYoVYC8qgHVN7KCKPRYjaIRiWVcpiS/L 1ZAbIDtBWP5aW9TvBDocEY2oz9hrdSOxVrrIE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EUG2Bl6auG4euKWbKCVfTQIsL72qesYuYx+oA0TLXYA=; b=J5737F4WYQXdWV5CTHOI5Os+KduUqEDXif/fqmp768TN4uN4zj3HCWjy9Vw+ah2Ykt 6nlDEE+A2FqP+gKl7HSUz8K3g86PxiearCEyLkF1ybvhRuQNOi0M0YQX8waWicucJaz5 KEMvK1ZMuW6O7ISz3NpF23fx+jBDd5ZxZ7AGyZudmrFgtCNqGdSHfYhy1WF7dgaJnpz0 1AoUCF11fNe6W8+E9AUKupms1XHcgrmVxCTIJwFnnb4nWKIlhK1bsCKyeM9oDJIR4EBw jZW9YUlLsmiksn2RudibDMleRClMQSfbxoyWEhIISyQCDi/YOZAhGt+SqsUNVOwRLyTP aOGQ== X-Gm-Message-State: AJIora9aEL2S9NxzHLdoKIA4jILH02YVKISeuPOcpwiYxucdYN82ZDYM TwplWpgFBDMoG9zKBhSVy0rp/PkmDC4zXoO20BhJpg== X-Received: by 2002:a05:6402:e96:b0:43a:f21f:42a0 with SMTP id h22-20020a0564020e9600b0043af21f42a0mr36554601eda.382.1658138188528; Mon, 18 Jul 2022 02:56:28 -0700 (PDT) MIME-Version: 1.0 References: <20220601011103.12681-1-dlunev@google.com> <20220601111059.v4.2.I692165059274c30b59bed56940b54a573ccb46e4@changeid> In-Reply-To: <20220601111059.v4.2.I692165059274c30b59bed56940b54a573ccb46e4@changeid> From: Miklos Szeredi Date: Mon, 18 Jul 2022 11:56:17 +0200 Message-ID: Subject: Re: [PATCH v4 2/2] FUSE: Retire superblock on force unmount To: Daniil Lunev Cc: linux-fsdevel@vger.kernel.org, Al Viro , Christoph Hellwig , "Theodore Ts'o" , linux-kernel@vger.kernel.org, fuse-devel , Daniil Lunev Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no 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 On Wed, 1 Jun 2022 at 03:11, Daniil Lunev wrote: > > From: Daniil Lunev > > Force unmount of FUSE severes the connection with the user space, even > if there are still open files. Subsequent remount tries to re-use the > superblock held by the open files, which is meaningless in the FUSE case > after disconnect - reused super block doesn't have userspace counterpart > attached to it and is incapable of doing any IO. > > Signed-off-by: Daniil Lunev > > Signed-off-by: Daniil Lunev Why the double sign-off? > --- > > (no changes since v3) > > Changes in v3: > - No changes > > Changes in v2: > - Use an exported function instead of directly modifying superblock > > fs/fuse/inode.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c > index 8c0665c5dff88..8875361544b2a 100644 > --- a/fs/fuse/inode.c > +++ b/fs/fuse/inode.c > @@ -476,8 +476,11 @@ static void fuse_umount_begin(struct super_block *sb) > { > struct fuse_conn *fc = get_fuse_conn_super(sb); > > - if (!fc->no_force_umount) > - fuse_abort_conn(fc); > + if (fc->no_force_umount) > + return; > + > + fuse_abort_conn(fc); > + retire_super(sb); And this is called for both block and non-block supers. Which means that the bdi will be unregistered, yet the sb could still be reused (see fuse_test_super()). Thanks, Miklos