From cbf62af3537a5a735594983a87112a8cd08480a3 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 31 May 2018 19:11:36 +0200 Subject: block: move initialization of elevator-related fields to blk_alloc_queue_node No point in doing this in elevator_init. Signed-off-by: Christoph Hellwig Reported-by: Damien Le Moal Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal Signed-off-by: Jens Axboe --- block/blk-core.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'block/blk-core.c') diff --git a/block/blk-core.c b/block/blk-core.c index a295b3c159b2..b00e7e6340ca 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -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; -- cgit v1.2.3