summaryrefslogtreecommitdiffstats
path: root/block/genhd.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 15b3c18d83379..2f444b87a5f24 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -676,6 +676,7 @@ void del_gendisk(struct gendisk *disk)
disk_part_iter_exit(&piter);
invalidate_partition(disk, 0);
+ bdev_unhash_inode(disk_devt(disk));
set_capacity(disk, 0);
disk->flags &= ~GENHD_FL_UP;