Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cbf62af3 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

block: move initialization of elevator-related fields to blk_alloc_queue_node



No point in doing this in elevator_init.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reported-by: default avatarDamien Le Moal <Damien.LeMoal@wdc.com>
Reviewed-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
Tested-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent f6c3ca0e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -999,6 +999,11 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id,
	if (!q)
		return NULL;

	INIT_LIST_HEAD(&q->queue_head);
	q->last_merge = NULL;
	q->end_sector = 0;
	q->boundary_rq = NULL;

	q->id = ida_simple_get(&blk_queue_ida, 0, 0, gfp_mask);
	if (q->id < 0)
		goto fail_q;
+0 −5
Original line number Diff line number Diff line
@@ -213,11 +213,6 @@ int elevator_init(struct request_queue *q, char *name)
	if (unlikely(q->elevator))
		return 0;

	INIT_LIST_HEAD(&q->queue_head);
	q->last_merge = NULL;
	q->end_sector = 0;
	q->boundary_rq = NULL;

	if (name) {
		e = elevator_get(q, name, true);
		if (!e)