Commit 73781b3b authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

block: remove disk_update_readahead

Mark blk_apply_bdi_limits non-static and open code disk_update_readahead
in the only caller.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDamien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20240626142637.300624-7-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 3302f6f0
...@@ -55,7 +55,7 @@ void blk_set_stacking_limits(struct queue_limits *lim) ...@@ -55,7 +55,7 @@ void blk_set_stacking_limits(struct queue_limits *lim)
} }
EXPORT_SYMBOL(blk_set_stacking_limits); EXPORT_SYMBOL(blk_set_stacking_limits);
static void blk_apply_bdi_limits(struct backing_dev_info *bdi, void blk_apply_bdi_limits(struct backing_dev_info *bdi,
struct queue_limits *lim) struct queue_limits *lim)
{ {
/* /*
...@@ -434,12 +434,6 @@ int queue_limits_set(struct request_queue *q, struct queue_limits *lim) ...@@ -434,12 +434,6 @@ int queue_limits_set(struct request_queue *q, struct queue_limits *lim)
} }
EXPORT_SYMBOL_GPL(queue_limits_set); EXPORT_SYMBOL_GPL(queue_limits_set);
void disk_update_readahead(struct gendisk *disk)
{
blk_apply_bdi_limits(disk->bdi, &disk->queue->limits);
}
EXPORT_SYMBOL_GPL(disk_update_readahead);
/** /**
* blk_limits_io_min - set minimum request size for a device * blk_limits_io_min - set minimum request size for a device
* @limits: the queue limits * @limits: the queue limits
......
...@@ -358,6 +358,8 @@ bool blk_rq_merge_ok(struct request *rq, struct bio *bio); ...@@ -358,6 +358,8 @@ bool blk_rq_merge_ok(struct request *rq, struct bio *bio);
enum elv_merge blk_try_merge(struct request *rq, struct bio *bio); enum elv_merge blk_try_merge(struct request *rq, struct bio *bio);
int blk_set_default_limits(struct queue_limits *lim); int blk_set_default_limits(struct queue_limits *lim);
void blk_apply_bdi_limits(struct backing_dev_info *bdi,
struct queue_limits *lim);
int blk_dev_init(void); int blk_dev_init(void);
/* /*
......
...@@ -524,7 +524,7 @@ int __must_check device_add_disk(struct device *parent, struct gendisk *disk, ...@@ -524,7 +524,7 @@ int __must_check device_add_disk(struct device *parent, struct gendisk *disk,
disk->part0->bd_dev = MKDEV(disk->major, disk->first_minor); disk->part0->bd_dev = MKDEV(disk->major, disk->first_minor);
} }
disk_update_readahead(disk); blk_apply_bdi_limits(disk->bdi, &disk->queue->limits);
disk_add_events(disk); disk_add_events(disk);
set_bit(GD_ADDED, &disk->state); set_bit(GD_ADDED, &disk->state);
return 0; return 0;
......
...@@ -973,7 +973,6 @@ static inline void blk_queue_disable_write_zeroes(struct request_queue *q) ...@@ -973,7 +973,6 @@ static inline void blk_queue_disable_write_zeroes(struct request_queue *q)
/* /*
* Access functions for manipulating queue properties * Access functions for manipulating queue properties
*/ */
void disk_update_readahead(struct gendisk *disk);
extern void blk_limits_io_min(struct queue_limits *limits, unsigned int min); extern void blk_limits_io_min(struct queue_limits *limits, unsigned int min);
extern void blk_limits_io_opt(struct queue_limits *limits, unsigned int opt); extern void blk_limits_io_opt(struct queue_limits *limits, unsigned int opt);
extern void blk_set_queue_depth(struct request_queue *q, unsigned int depth); extern void blk_set_queue_depth(struct request_queue *q, unsigned int depth);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment