
From: Hou Tao <houtao1@huawei.com> hulk inclusion category: bugfix bugzilla: 55097 CVE: NA ------------------------------------------------- This reverts commit 10097449f40604d121f5854b063b62dfcaaa669a. The patch set for partition symlink cleanup will introduce deadlock for nbd, loop and xen-blkfront driver, so revert it. Reviewed-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- block/genhd.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/block/genhd.c b/block/genhd.c index 1bf24be80cca9..93ef7298eac42 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -764,7 +764,6 @@ void del_gendisk(struct gendisk *disk) { struct disk_part_iter piter; struct hd_struct *part; - struct block_device *bdev; blk_integrity_del(disk); disk_del_events(disk); @@ -774,14 +773,6 @@ void del_gendisk(struct gendisk *disk) * disk is marked as dead (GENHD_FL_UP cleared). */ down_write(&disk->lookup_sem); - - /* - * If bdev is null, that menas memory allocate fail. Then - * add_partitions can also fail. - */ - bdev = bdget_disk(disk, 0); - if (bdev) - mutex_lock(&bdev->bd_mutex); /* invalidate stuff */ disk_part_iter_init(&piter, disk, DISK_PITER_INCL_EMPTY | DISK_PITER_REVERSE); @@ -791,8 +782,6 @@ void del_gendisk(struct gendisk *disk) delete_partition(disk, part->partno); } disk_part_iter_exit(&piter); - if (bdev) - mutex_unlock(&bdev->bd_mutex); invalidate_partition(disk, 0); bdev_unhash_inode(disk_devt(disk)); -- 2.25.1