block: remove hd_struct_kill
authorChristoph Hellwig <hch@lst.de>
Tue, 14 Apr 2020 07:28:56 +0000 (09:28 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 20 Apr 2020 17:32:59 +0000 (11:32 -0600)
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>
block/blk.h
block/partitions/core.c

index b1a0b8c..204963b 100644 (file)
@@ -413,11 +413,6 @@ static inline void hd_struct_put(struct hd_struct *part)
        percpu_ref_put(&part->ref);
 }
 
-static inline void hd_struct_kill(struct hd_struct *part)
-{
-       percpu_ref_kill(&part->ref);
-}
-
 static inline void hd_free_part(struct hd_struct *part)
 {
        free_part_stats(part);
index c5b4762..7d06259 100644 (file)
@@ -321,7 +321,7 @@ void delete_partition(struct gendisk *disk, struct hd_struct *part)
         * "in-use" until we really free the gendisk.
         */
        blk_invalidate_devt(part_devt(part));
-       hd_struct_kill(part);
+       percpu_ref_kill(&part->ref);
 }
 
 static ssize_t whole_disk_show(struct device *dev,