diff options
author | Christoph Hellwig <hch@lst.de> | 2020-04-14 09:29:01 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-04-20 11:32:59 -0600 |
commit | 02d33b6771fcc63c98cb48cad0cd8b8fb033837a (patch) | |
tree | d62f65fb13361e75e3babadaa8c5a5da916fd765 /block/genhd.c | |
parent | d5f3178ec9ab8a3a71763310d260e1d2a047baf1 (diff) | |
download | linux-02d33b6771fcc63c98cb48cad0cd8b8fb033837a.tar.gz linux-02d33b6771fcc63c98cb48cad0cd8b8fb033837a.tar.bz2 linux-02d33b6771fcc63c98cb48cad0cd8b8fb033837a.zip |
block: mark invalidate_partition static
invalidate_partition is only used in genhd.c, so mark it static. Also
drop the return value given that is is always ignored.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/genhd.c')
-rw-r--r-- | block/genhd.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/block/genhd.c b/block/genhd.c index 1cc50ad5b191..980a4609d4a5 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -878,6 +878,19 @@ void device_add_disk_no_queue_reg(struct device *parent, struct gendisk *disk) } EXPORT_SYMBOL(device_add_disk_no_queue_reg); +static void invalidate_partition(struct gendisk *disk, int partno) +{ + struct block_device *bdev; + + bdev = bdget_disk(disk, partno); + if (!bdev) + return; + + fsync_bdev(bdev); + __invalidate_device(bdev, true); + bdput(bdev); +} + void del_gendisk(struct gendisk *disk) { struct disk_part_iter piter; @@ -1806,20 +1819,6 @@ int bdev_read_only(struct block_device *bdev) EXPORT_SYMBOL(bdev_read_only); -int invalidate_partition(struct gendisk *disk, int partno) -{ - int res = 0; - struct block_device *bdev = bdget_disk(disk, partno); - if (bdev) { - fsync_bdev(bdev); - res = __invalidate_device(bdev, true); - bdput(bdev); - } - return res; -} - -EXPORT_SYMBOL(invalidate_partition); - /* * Disk events - monitor disk events like media change and eject request. */ |