Re: [PATCH 13/26] dm: convert to blk_alloc_disk/blk_cleanup_disk

From
Christoph Hellwig <hch@lst.de>
Date
2021-05-24 07:26:04
Also in
dm-devel, linux-block, linux-m68k, linux-mmc, linux-nvme, linux-raid, linux-s390, linuxppc-dev, nvdimm
Reply to
Hannes Reinecke, 2021-05-23
On Sun, May 23, 2021 at 10:10:34AM +0200, Hannes Reinecke wrote:
Can't these conditionals be merged into a single 'if (md->disk)'?
Eg like:

	if (md->disk) {
		spin_lock(&_minor_lock);
		md->disk->private_data = NULL;
		spin_unlock(&_minor_lock);
		del_gendisk(md->disk);
		dm_queue_destroy_keyslot_manager(md->queue);
		blk_cleanup_disk(md->queue);
	}

We're now always allocating 'md->disk' and 'md->queue' together,
so how can we end up in a situation where one is set without the other?
I guess we could do that, not sure it is worth the churn, though.
Thread (76 messages) 76 messages, 8 authors, last reply 2021-06-07
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help