diff options
author | Ming Lei <tom.leiming@gmail.com> | 2015-07-16 11:16:44 +0800 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-07-17 08:41:53 -0600 |
commit | b54e5ed8f285d62c0d242c4ef9da90937994db02 (patch) | |
tree | ee9303a8a5df76206884f3ed4c61a1e9fd83721a /include/linux | |
parent | 21bdb584af8cca7c6df3c44cba268be050a234eb (diff) | |
download | op-kernel-dev-b54e5ed8f285d62c0d242c4ef9da90937994db02.zip op-kernel-dev-b54e5ed8f285d62c0d242c4ef9da90937994db02.tar.gz |
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 'include/linux')
-rw-r--r-- | include/linux/genhd.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index ec274e0..a221220 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -663,6 +663,12 @@ static inline void hd_struct_put(struct hd_struct *part) __delete_partition(part); } +static inline void hd_free_part(struct hd_struct *part) +{ + free_part_stats(part); + free_part_info(part); +} + /* * Any access of part->nr_sects which is not protected by partition * bd_mutex or gendisk bdev bd_mutex, should be done using this |