From 9451aa0aacaf7ea13d1acfd5de8b63a6e0b24fac Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Mon, 16 Aug 2021 14:26:13 +0200 Subject: 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 Link: https://lore.kernel.org/r/20210816122614.601358-2-hch@lst.de Signed-off-by: Jens Axboe --- block/partitions/core.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'block/partitions/core.c') diff --git a/block/partitions/core.c b/block/partitions/core.c index 9265936df77e..58c4c362c94f 100644 --- a/block/partitions/core.c +++ b/block/partitions/core.c @@ -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); } -- cgit v1.2.3