mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
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>
This commit is contained in:
parent
21bdb584af
commit
b54e5ed8f2
3 changed files with 8 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue