mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
block: free the extended dev_t minor later
The dev_t is used as the inode hash, so we should only released it once then block device inode is gone from the inode cache. Move it to bdev_free_inode to ensure that. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20210816122614.601358-2-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
4f1e9630af
commit
9451aa0aac
@@ -259,8 +259,6 @@ static const struct attribute_group *part_attr_groups[] = {
|
||||
|
||||
static void part_release(struct device *dev)
|
||||
{
|
||||
if (MAJOR(dev->devt) == BLOCK_EXT_MAJOR)
|
||||
blk_free_ext_minor(MINOR(dev->devt));
|
||||
put_disk(dev_to_bdev(dev)->bd_disk);
|
||||
iput(dev_to_bdev(dev)->bd_inode);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user