aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-05-31 13:11:36 -0400
committerJens Axboe <axboe@kernel.dk>2018-06-01 09:38:14 -0400
commitcbf62af3537a5a735594983a87112a8cd08480a3 (patch)
tree57c60e2d7c8c2c853261cbacfcc45d8369663826
parentf6c3ca0e58446e8de6c6f1a2a73f037fb900c372 (diff)
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 <hch@lst.de> Reported-by: Damien Le Moal <Damien.LeMoal@wdc.com> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com> Tested-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--block/blk-core.c5
-rw-r--r--block/elevator.c5
2 files changed, 5 insertions, 5 deletions
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,
999 if (!q) 999 if (!q)
1000 return NULL; 1000 return NULL;
1001 1001
1002 INIT_LIST_HEAD(&q->queue_head);
1003 q->last_merge = NULL;
1004 q->end_sector = 0;
1005 q->boundary_rq = NULL;
1006
1002 q->id = ida_simple_get(&blk_queue_ida, 0, 0, gfp_mask); 1007 q->id = ida_simple_get(&blk_queue_ida, 0, 0, gfp_mask);
1003 if (q->id < 0) 1008 if (q->id < 0)
1004 goto fail_q; 1009 goto fail_q;
diff --git a/block/elevator.c b/block/elevator.c
index e87e9b43aba0..8b64f92e029a 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -213,11 +213,6 @@ int elevator_init(struct request_queue *q, char *name)
213 if (unlikely(q->elevator)) 213 if (unlikely(q->elevator))
214 return 0; 214 return 0;
215 215
216 INIT_LIST_HEAD(&q->queue_head);
217 q->last_merge = NULL;
218 q->end_sector = 0;
219 q->boundary_rq = NULL;
220
221 if (name) { 216 if (name) {
222 e = elevator_get(q, name, true); 217 e = elevator_get(q, name, true);
223 if (!e) 218 if (!e)