[PATCH 1/6] block: move initialization of elevator-related fields to blk_alloc_queue_node

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



No point in doing this in elevator_init.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Reported-by: Damien Le Moal <Damien.LeMoal@xxxxxxx>
Reviewed-by: Damien Le Moal <damien.lemoal@xxxxxxx>
Tested-by: Damien Le Moal <damien.lemoal@xxxxxxx>
---
 block/blk-core.c | 5 +++++
 block/elevator.c | 5 -----
 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,
 	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;
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)
 	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)
-- 
2.17.0




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux