Thread (2 messages) flat view 2 messages, 2 authors, 2021-11-03
STALE1782d LANDED: 5 (4M)

2 review trailers; landed in mainline as 3aefb5ee843f on 2021-11-03.

[PATCH v3] nvdimm/btt: do not call del_gendisk() if not needed

From: Luis Chamberlain <mcgrof@kernel.org>
Date: 2021-11-03 16:58:49
Also in: lkml, nvdimm
Subsystem: libnvdimm btt: block translation table, libnvdimm: non-volatile memory device subsystem, the rest · Maintainers: Vishal Verma, Dan Williams, Dave Jiang, Alison Schofield, Linus Torvalds

del_gendisk() should not called if the disk has not been added. Fix this.

Fixes: 41cd8b70c37a ("libnvdimm, btt: add support for blk integrity")
Reviewed-by: Dan Williams <redacted>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---

This v3 just makes it clear that this is just wrong regarless of the
kernel, and adds Christoph's Reviewed-by tag.

 drivers/nvdimm/btt.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
index f10a50ffa047..a62f23b945f1 100644
--- a/drivers/nvdimm/btt.c
+++ b/drivers/nvdimm/btt.c
@@ -1537,7 +1537,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.33.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help