mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
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 <[email protected]> Reported-by: Damien Le Moal <[email protected]> Reviewed-by: Damien Le Moal <[email protected]> Tested-by: Damien Le Moal <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
f6c3ca0e58
commit
cbf62af353
2 changed files with 5 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue