diff options
Diffstat (limited to 'block/genhd.c')
-rw-r--r-- | block/genhd.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/block/genhd.c b/block/genhd.c index 9b121b1f7998..15f99da4543f 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -686,11 +686,8 @@ void del_gendisk(struct gendisk *disk) /* invalidate stuff */ disk_part_iter_init(&piter, disk, DISK_PITER_INCL_EMPTY); - while ((part = disk_part_iter_next(&piter))) { - fsync_bdev(part); - __invalidate_device(part, true); + while ((part = disk_part_iter_next(&piter))) delete_partition(part); - } disk_part_iter_exit(&piter); fsync_bdev(disk->part0); |