This is a note to let you know that I've just added the patch titled nvdimm/btt: do not call del_gendisk() if not needed to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: nvdimm-btt-do-not-call-del_gendisk-if-not-needed.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit eca258cca66c85dc7492d255bf3754d2ed92bb58 Author: Luis Chamberlain <mcgrof@xxxxxxxxxx> Date: Wed Nov 3 09:58:43 2021 -0700 nvdimm/btt: do not call del_gendisk() if not needed [ Upstream commit 3aefb5ee843fbe4789d03bb181e190d462df95e4 ] 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 <dan.j.williams@xxxxxxxxx> Reviewed-by: Christoph Hellwig <hch@xxxxxx> Signed-off-by: Luis Chamberlain <mcgrof@xxxxxxxxxx> Link: https://lore.kernel.org/r/20211103165843.1402142-1-mcgrof@xxxxxxxxxx Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c index 92dec49522972..3fd1bdb9fc05b 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; }