Skip to content

Commit 4377b48

Browse files
Christoph Hellwigaxboe
authored andcommitted
block: remove hd_struct_kill
The function has a single caller, so just open code it. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 8da2892 commit 4377b48

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

‎block/blk.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -413,11 +413,6 @@ static inline void hd_struct_put(struct hd_struct *part)
413413
percpu_ref_put(&part->ref);
414414
}
415415

416-
static inline void hd_struct_kill(struct hd_struct *part)
417-
{
418-
percpu_ref_kill(&part->ref);
419-
}
420-
421416
static inline void hd_free_part(struct hd_struct *part)
422417
{
423418
free_part_stats(part);

‎block/partitions/core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ void delete_partition(struct gendisk *disk, struct hd_struct *part)
321321
* "in-use" until we really free the gendisk.
322322
*/
323323
blk_invalidate_devt(part_devt(part));
324-
hd_struct_kill(part);
324+
percpu_ref_kill(&part->ref);
325325
}
326326

327327
static ssize_t whole_disk_show(struct device *dev,

0 commit comments

Comments
 (0)