From 33b040f77d59f2177b6a1f86c341d41f7b1f982d Mon Sep 17 00:00:00 2001 From: Yu Kuai Date: Fri, 7 Apr 2023 16:59:58 +0800 Subject: [PATCH] block: Revert "block: check 'bd_super' before rescanning partition" hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I6MRB5 CVE: NA -------------------------------- This reverts commit 00f206947a6c9d4fbe40f4d328bfc11e04020cdc. Mainline solution will be backported in following patches. Signed-off-by: Yu Kuai Reviewed-by: Hou Tao Signed-off-by: Yongqiang Liu --- block/partition-generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/partition-generic.c b/block/partition-generic.c index c4ac7a8c77dc..2261566741f4 100644 --- a/block/partition-generic.c +++ b/block/partition-generic.c @@ -464,7 +464,7 @@ static int drop_partitions(struct gendisk *disk, struct block_device *bdev) struct hd_struct *part; int res; - if (bdev->bd_part_count || bdev->bd_super) + if (bdev->bd_part_count) return -EBUSY; res = invalidate_partition(disk, 0); if (res) -- GitLab