Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
block: fix leaking minors of hidden disks
The major/minor of a hidden gendisk is not propagated to the block device because it is never registered using bdev_add. But the lack of bd_dev also causes the dynamic major minor number not to be freed. Assign bd_dev manually to ensure the dynamic major minor gets freed. Based on a patch by Keith Busch. Fixes: 8ddcd65 ("block: introduce GENHD_FL_HIDDEN") Reported-by: Daniel Wagner <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Tested-by: Daniel Wagner <[email protected]> Reviewed-by: Keith Busch <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
- Loading branch information