From patchwork Thu Oct 21 12:44:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 1544366 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=y+0nZuV2; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HZnKJ3K6Zz9sRR for ; Thu, 21 Oct 2021 23:46:12 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZPI9f+kJAOAxI2Vjp1aYln+GD3RE8cnAm+44661rRi8=; b=y+0nZuV2I9bnrL Yi1dfpD23xB2DMrKSVrD7JyPXgQ7J3wb/V/TruzEDtF3uRat9ZpV66CGkasGAmGfGsKcUUweGjnFS hl4dqkt4m8OzKXaUkUgGwbn0q7PxTzMJtOSgj6FnspXhiaG6gLLgfHN8/EV4tGBqwcjvfQ7LKedBF JY91JBxPihMKtEmQT6jnZpRXO2+PltVJr7CpSvx1XidJu5PTxoFehNFLxfhbb0M/geQszojbFqEkQ 6P15qSxJ5rrWa5er3HTABsWrkt/Ib7V+WqWMmT137KR9O2hnsiDdqHYGjygLxy3zAcwlLj2+FTg5A 0vxdM0oqQXRBRpoet3dw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdXS2-007XHK-9d; Thu, 21 Oct 2021 12:45:42 +0000 Received: from [2001:4bb8:180:8777:dd70:8011:36d9:4c23] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdXRI-007X0C-RZ; Thu, 21 Oct 2021 12:44:57 +0000 From: Christoph Hellwig To: Andrew Morton Cc: Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Jan Kara , linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 4/5] mm: don't automatically unregister bdis Date: Thu, 21 Oct 2021 14:44:40 +0200 Message-Id: <20211021124441.668816-5-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211021124441.668816-1-hch@lst.de> References: <20211021124441.668816-1-hch@lst.de> MIME-Version: 1.0 X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org All BDI users now unregister explicitly. Signed-off-by: Christoph Hellwig Reviewed-by: Jan Kara --- mm/backing-dev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 8a46a0a4b72fa..768e9ae489f66 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -965,8 +965,7 @@ static void release_bdi(struct kref *ref) struct backing_dev_info *bdi = container_of(ref, struct backing_dev_info, refcnt); - if (test_bit(WB_registered, &bdi->wb.state)) - bdi_unregister(bdi); + WARN_ON_ONCE(test_bit(WB_registered, &bdi->wb.state)); WARN_ON_ONCE(bdi->dev); wb_exit(&bdi->wb); kfree(bdi);