Skip to contentSkip to conversation

nvdimm/btt: do not call del_gendisk() if not needed

PATCH Applied Luis Chamberlain 2 participants 2 messages Nov 3, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

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

Fixes 41cd8b70c37a ("libnvdimm, btt: add support for blk integrity")

---

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(-)
drivers/nvdimm/btt.c +0 -1
index f10a50ffa047..a62f23b945f1 100644
@@ -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;
 		}
Signature · 1 line
2.33.0
maintainer Applied
#1 lore raw
Quoted 3 lines · Luis Chamberlain

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

Applied, thanks!

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

      commit: 3aefb5ee843fbe4789d03bb181e190d462df95e4

Best regards,

Signature · 1 line
Jens Axboe