[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210827191809.3118103-5-mcgrof@kernel.org>
Date: Fri, 27 Aug 2021 12:18:03 -0700
From: Luis Chamberlain <mcgrof@...nel.org>
To: axboe@...nel.dk, colyli@...e.de, kent.overstreet@...il.com,
kbusch@...nel.org, sagi@...mberg.me, vishal.l.verma@...el.com,
dan.j.williams@...el.com, dave.jiang@...el.com,
ira.weiny@...el.com, konrad.wilk@...cle.com, roger.pau@...rix.com,
boris.ostrovsky@...cle.com, jgross@...e.com,
sstabellini@...nel.org, minchan@...nel.org, ngupta@...are.org,
senozhatsky@...omium.org
Cc: xen-devel@...ts.xenproject.org, nvdimm@...ts.linux.dev,
linux-nvme@...ts.infradead.org, linux-bcache@...r.kernel.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
Luis Chamberlain <mcgrof@...nel.org>
Subject: [PATCH 04/10] nvdimm/btt: do not call del_gendisk() if not needed
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 <mcgrof@...nel.org>
---
drivers/nvdimm/btt.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
index 92dec4952297..3fd1bdb9fc05 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
Powered by blists - more mailing lists