From: Jun'ichi Nomura <j-nomura.nec.com> Don't release the minor number for reuse within device-mapper until after del_gendisk() has released it. Signed-off-by: Jun'ichi Nomura <j-nomura.nec.com> Signed-Off-By: Alasdair G Kergon <agk> Index: linux-2.6.16-rc1/drivers/md/dm.c =================================================================== --- linux-2.6.16-rc1.orig/drivers/md/dm.c 2006-03-01 21:42:55.000000000 +0000 +++ linux-2.6.16-rc1/drivers/md/dm.c 2006-03-01 21:42:59.000000000 +0000 @@ -849,14 +849,16 @@ static struct mapped_device *alloc_dev(u static void free_dev(struct mapped_device *md) { + unsigned int minor = md->disk->first_minor; + if (md->suspended_bdev) { thaw_bdev(md->suspended_bdev, NULL); bdput(md->suspended_bdev); } - free_minor(md->disk->first_minor); mempool_destroy(md->tio_pool); mempool_destroy(md->io_pool); del_gendisk(md->disk); + free_minor(minor); put_disk(md->disk); blk_put_queue(md->queue); kfree(md);
*** Bug 183664 has been marked as a duplicate of this bug. ***
committed in stream u4 build 34.9. A test kernel with this patch is available from http://people.redhat.com/~jbaron/rhel4/
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2006-0575.html