diff options
Diffstat (limited to 'block/partitions/core.c')
-rw-r--r-- | block/partitions/core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/partitions/core.c b/block/partitions/core.c index 536f7c5bb0b6..9fbaec466b51 100644 --- a/block/partitions/core.c +++ b/block/partitions/core.c @@ -531,6 +531,8 @@ void blk_drop_partitions(struct gendisk *disk) struct disk_part_iter piter; struct block_device *part; + lockdep_assert_held(&disk->part0->bd_mutex); + disk_part_iter_init(&piter, disk, DISK_PITER_INCL_EMPTY); while ((part = disk_part_iter_next(&piter))) delete_partition(part); |