Skip to content

Commit 73781b3

Browse files
Christoph Hellwigaxboe
authored andcommitted
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: Christoph Hellwig <[email protected]> Reviewed-by: Damien Le Moal <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 3302f6f commit 73781b3

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

block/blk-settings.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void blk_set_stacking_limits(struct queue_limits *lim)
5555
}
5656
EXPORT_SYMBOL(blk_set_stacking_limits);
5757

58-
static void blk_apply_bdi_limits(struct backing_dev_info *bdi,
58+
void blk_apply_bdi_limits(struct backing_dev_info *bdi,
5959
struct queue_limits *lim)
6060
{
6161
/*
@@ -434,12 +434,6 @@ int queue_limits_set(struct request_queue *q, struct queue_limits *lim)
434434
}
435435
EXPORT_SYMBOL_GPL(queue_limits_set);
436436

437-
void disk_update_readahead(struct gendisk *disk)
438-
{
439-
blk_apply_bdi_limits(disk->bdi, &disk->queue->limits);
440-
}
441-
EXPORT_SYMBOL_GPL(disk_update_readahead);
442-
443437
/**
444438
* blk_limits_io_min - set minimum request size for a device
445439
* @limits: the queue limits

block/blk.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,8 @@ bool blk_rq_merge_ok(struct request *rq, struct bio *bio);
358358
enum elv_merge blk_try_merge(struct request *rq, struct bio *bio);
359359

360360
int blk_set_default_limits(struct queue_limits *lim);
361+
void blk_apply_bdi_limits(struct backing_dev_info *bdi,
362+
struct queue_limits *lim);
361363
int blk_dev_init(void);
362364

363365
/*

block/genhd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ int __must_check device_add_disk(struct device *parent, struct gendisk *disk,
524524
disk->part0->bd_dev = MKDEV(disk->major, disk->first_minor);
525525
}
526526

527-
disk_update_readahead(disk);
527+
blk_apply_bdi_limits(disk->bdi, &disk->queue->limits);
528528
disk_add_events(disk);
529529
set_bit(GD_ADDED, &disk->state);
530530
return 0;

include/linux/blkdev.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,6 @@ static inline void blk_queue_disable_write_zeroes(struct request_queue *q)
973973
/*
974974
* Access functions for manipulating queue properties
975975
*/
976-
void disk_update_readahead(struct gendisk *disk);
977976
extern void blk_limits_io_min(struct queue_limits *limits, unsigned int min);
978977
extern void blk_limits_io_opt(struct queue_limits *limits, unsigned int opt);
979978
extern void blk_set_queue_depth(struct request_queue *q, unsigned int depth);

0 commit comments

Comments
 (0)