summaryrefslogtreecommitdiffstats
path: root/block/genhd.c
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2015-07-16 11:16:44 +0800
committerJens Axboe <axboe@fb.com>2015-07-17 08:41:53 -0600
commitb54e5ed8f285d62c0d242c4ef9da90937994db02 (patch)
treeee9303a8a5df76206884f3ed4c61a1e9fd83721a /block/genhd.c
parent21bdb584af8cca7c6df3c44cba268be050a234eb (diff)
downloadlinux-b54e5ed8f285d62c0d242c4ef9da90937994db02.tar.bz2
block: partition: introduce hd_free_part()
So the helper can be used in both generic partition case and part0 case. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 59a1395eedac..85df45292dba 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -1110,8 +1110,7 @@ static void disk_release(struct device *dev)
disk_release_events(disk);
kfree(disk->random);
disk_replace_part_tbl(disk, NULL);
- free_part_stats(&disk->part0);
- free_part_info(&disk->part0);
+ hd_free_part(&disk->part0);
if (disk->queue)
blk_put_queue(disk->queue);
kfree(disk);