summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/partitions/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/partitions/core.c b/block/partitions/core.c
index b79c4513629b..1a0a829d8416 100644
--- a/block/partitions/core.c
+++ b/block/partitions/core.c
@@ -496,7 +496,7 @@ int blk_drop_partitions(struct gendisk *disk, struct block_device *bdev)
if (!disk_part_scan_enabled(disk))
return 0;
- if (bdev->bd_part_count || bdev->bd_super)
+ if (bdev->bd_part_count || bdev->bd_openers)
return -EBUSY;
res = invalidate_partition(disk, 0);
if (res)