From nobody Fri Nov 29 18:50:45 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1632780085; cv=none; d=zohomail.com; s=zohoarc; b=Z6k9qFPmmh0Po8Hz1prwh/CsGenoqv2G4+zJXDzt+h0PYL3PrvpCv2F0roa2iHYn0BVLJf2+XVRL0VWQVNNA2FtkgR//ZzmPoGFqP/FZlGCVxqnEoVXNRE3uAi1VKMpr/r/Zxrt0zb8IVuRvOkk8gFbgUpPoqW+YJ4wHRT/zuFc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1632780085; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=DvHJoJ6f5lcZ7SxjJw+FCx0/QeyauIuzT+VR1mX8TXg=; b=E/l6GhcgjNrU0S4Eh1L4Ziz84FIk95P+DsNB3YOPbYG2fJTVHGF9eUpXcduoPdEH72+fAkCNhqbtEO1blqbOlSBVagiwt0D2OA2MgqbaV9f8FShcCOODPZ13czMmRog5Jpd2a85LYPM0bZe4rvJ7dtT3ob8u7GfPJYPKSAEuOuA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1632780085874104.61934523629793; Mon, 27 Sep 2021 15:01:25 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.197201.350208 (Exim 4.92) (envelope-from ) id 1mUygS-00023x-1Z; Mon, 27 Sep 2021 22:01:12 +0000 Received: by outflank-mailman (output) from mailman id 197201.350208; Mon, 27 Sep 2021 22:01:12 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mUygR-00023f-Sg; Mon, 27 Sep 2021 22:01:11 +0000 Received: by outflank-mailman (input) for mailman id 197201; Mon, 27 Sep 2021 22:01:11 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mUygR-0000mS-ES for xen-devel@lists.xenproject.org; Mon, 27 Sep 2021 22:01:11 +0000 Received: from bombadil.infradead.org (unknown [2607:7c80:54:e::133]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 38d858f2-84fe-4674-8f1f-42af4c0ee3ab; Mon, 27 Sep 2021 22:00:49 +0000 (UTC) Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mUyfw-004Suu-Fq; Mon, 27 Sep 2021 22:00:40 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list X-Inumbo-ID: 38d858f2-84fe-4674-8f1f-42af4c0ee3ab 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=elnPQS+ctA3KT/ki2GQVFEC0IV RTWRmV32tiJGwilpjX3SNpHglIJBAVIeGXZKH+X3ixYZ7S6APxsLuq0LBFdyBEm0bI5NylSr6YGJk QzCSLP3xfX3rbUJ7B1uiGuEVT/xJeyaVhGqxlGo2m9uPPj12ehaPIOrXhs5sc+AnUE0yB322PBODD eVZWnMKrVd6oBx/TZLLisZG4oTrBSlBnaHMoONzXuDEfAylMjbvMOj7kvRLv5BYXdpUYCctkN9jT4 zAlwg4mNR2tncvqZkqop5VrsUe7e8ibXvwtwAWUbxE+wPFTxBdbc1EVxV5wEO/TWYCRG1WD3mm1Wl l3K/xSmA==; From: Luis Chamberlain To: axboe@kernel.dk, colyli@suse.de, kent.overstreet@gmail.com, kbusch@kernel.org, sagi@grimberg.me, vishal.l.verma@intel.com, dan.j.williams@intel.com, dave.jiang@intel.com, ira.weiny@intel.com, konrad.wilk@oracle.com, roger.pau@citrix.com, boris.ostrovsky@oracle.com, jgross@suse.com, sstabellini@kernel.org, minchan@kernel.org, ngupta@vflare.org, senozhatsky@chromium.org Cc: xen-devel@lists.xenproject.org, nvdimm@lists.linux.dev, linux-nvme@lists.infradead.org, linux-bcache@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Chamberlain Subject: [PATCH v2 04/10] nvdimm/btt: do not call del_gendisk() if not needed Date: Mon, 27 Sep 2021 15:00:33 -0700 Message-Id: <20210927220039.1064193-5-mcgrof@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210927220039.1064193-1-mcgrof@kernel.org> References: <20210927220039.1064193-1-mcgrof@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: Luis Chamberlain X-ZohoMail-DKIM: pass (identity @infradead.org) X-ZM-MESSAGEID: 1632780087215100014 Content-Type: text/plain; charset="utf-8" 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 =3D nd_integrity_init(btt->btt_disk, btt_meta_size(btt)); =20 if (rc) { - del_gendisk(btt->btt_disk); blk_cleanup_disk(btt->btt_disk); return rc; } --=20 2.30.2