Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2609503pxb; Sun, 17 Oct 2021 20:24:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfEGIUL5jhZUrHtba5p6xq2AU9vbg2HbP03e9HyvQmI2zSYWhhAiCOClMhlJZ3klUinhB/ X-Received: by 2002:a17:90a:df0e:: with SMTP id gp14mr30312904pjb.35.1634527466961; Sun, 17 Oct 2021 20:24:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634527466; cv=none; d=google.com; s=arc-20160816; b=W3lC1nPYNK7jMkBHtzEXXfB76gxEFsbtweil3PLnuNPw+GHbv055a07RCu3AMvpWYm scv1xeWXE9usxO/pAgVoKMo/xMYV8fbC/u2LBDYkKAqEexPMUdoO2/JvC5lnLBjJAW/a 92xNDqI3teKQ5FLa7taVwKFdsknJlsfPxG1oAWcsRkXTokSonnCt9lGmmIHKkUyrZU5N ZYR9zC9i7sxeJF3fl5InBerLrZRlHMCfxrLWngjTgoAInGNsUHJ8ipWdfRrBlK8FQDtX ZVARU2H0Go9oXpczhmYNsIUXGd2xrsaTtt/b2vEljVp7EYMknB7qe8MFBTbL8On5Rv+y OUiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DvHJoJ6f5lcZ7SxjJw+FCx0/QeyauIuzT+VR1mX8TXg=; b=OcwWf1VOAcSHlDkGz2PlvL7hz1irG2s0dpbyk99JoCKZ1L0HF1EqdsabO8jl7N21eK NJlG7EIw/tjNgm6UFEZ4FqB6b5HzKBl1iwqjAPsQaEjt8dL3M3gtgOwAPEhnGjAd3M5i 3xKhX1HHc9s92oqNTAZAQYmm11hyyPi8DSv0JGfRbJ5ShPTrwEN9xbYZCF2p1zrjv62b 3oPe1yh/S5jH6jPoGU9JGIBXkCsW+afpfOWW3ZIth5twOJBf5GdGn4rF/4NyK1b/qnzN VMItMemWTc/IxCuqzTj3nux0Xssk7JH7VC6unm7dSHMhyPRrhDnKt19SytVeqpzB2kkr gH0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=WqCyvtnb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y4si39113pfq.244.2021.10.17.20.24.15; Sun, 17 Oct 2021 20:24:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=WqCyvtnb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239218AbhJOXzL (ORCPT + 98 others); Fri, 15 Oct 2021 19:55:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239064AbhJOXzG (ORCPT ); Fri, 15 Oct 2021 19:55:06 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B7BDC061762; Fri, 15 Oct 2021 16:52:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=DvHJoJ6f5lcZ7SxjJw+FCx0/QeyauIuzT+VR1mX8TXg=; b=WqCyvtnbtX6HCtzZaWprhI8LPk 5tMl9B0oF0EnGaItbPWV7xbxJK+adiN9VVCKXB/M2GfWARUCCV3T8KEibbRJSz3aDW6D5OiiZ6wHM 8qVdKF6pH8EuHs+LXs8oZUWIXquKFEIiOMG2uZKBH76SzWh+nIWHrJl917TzDIZ9kexOKM/c1kpGw ctvD5cKhgD4w9OjHiY4gg0T19gbDx3FNpEBK1lWDk4szfCMyZBsc95SSS4z3rgXwuQgY7qYbT06ZV /k0UT1eSzKtGk/dxuCBoCyHY4EUkQx/2ywUk0fjyNsOOJPqbW7Po+r4y4oz+envQB/gqmy2MIlmOD zNztSqMA==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbWzt-009C2z-1G; Fri, 15 Oct 2021 23:52:21 +0000 From: Luis Chamberlain To: axboe@kernel.dk, geoff@infradead.org, mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org, jim@jtan.com, minchan@kernel.org, ngupta@vflare.org, senozhatsky@chromium.org, richard@nod.at, miquel.raynal@bootlin.com, vigneshr@ti.com, dan.j.williams@intel.com, vishal.l.verma@intel.com, dave.jiang@intel.com, ira.weiny@intel.com, kbusch@kernel.org, hch@lst.de, sagi@grimberg.me Cc: linux-block@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-mtd@lists.infradead.org, nvdimm@lists.linux.dev, linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org, Luis Chamberlain Subject: [PATCH 03/13] nvdimm/btt: do not call del_gendisk() if not needed Date: Fri, 15 Oct 2021 16:52:09 -0700 Message-Id: <20211015235219.2191207-4-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211015235219.2191207-1-mcgrof@kernel.org> References: <20211015235219.2191207-1-mcgrof@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: Luis Chamberlain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We know we don't need del_gendisk() if we haven't added the disk, so just skip it. This should fix a bug on older kernels, as del_gendisk() became able to deal with disks not added only recently, after the patch titled "block: add flag for add_disk() completion notation". Signed-off-by: Luis Chamberlain --- drivers/nvdimm/btt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c index 52de60b7adee..29cc7325e890 100644 --- a/drivers/nvdimm/btt.c +++ b/drivers/nvdimm/btt.c @@ -1538,7 +1538,6 @@ static int btt_blk_init(struct btt *btt) int rc = nd_integrity_init(btt->btt_disk, btt_meta_size(btt)); if (rc) { - del_gendisk(btt->btt_disk); blk_cleanup_disk(btt->btt_disk); return rc; } -- 2.30.2