]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
block: move initialization of elevator-related fields to blk_alloc_queue_node
authorChristoph Hellwig <hch@lst.de>
Thu, 31 May 2018 17:11:36 +0000 (19:11 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 1 Jun 2018 13:38:14 +0000 (07:38 -0600)
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>
block/blk-core.c
block/elevator.c

index a295b3c159b2a3f8edd51e5ff5c833186229649e..b00e7e6340ca1941094b7d51ad62dc5b9830b559 100644 (file)
@@ -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;
index e87e9b43aba09ac2989d4350e225422892ab6944..8b64f92e029a5c87dd663ddb1902ff30bc0bc11a 100644 (file)
@@ -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)