]> www.infradead.org Git - nvme.git/commitdiff
mq-deadline: Remove a local variable
authorBart Van Assche <bvanassche@acm.org>
Thu, 12 Dec 2024 21:29:39 +0000 (13:29 -0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 13 Dec 2024 15:09:43 +0000 (08:09 -0700)
Since commit fde02699c242 ("block: mq-deadline: Remove support for zone
write locking"), the local variable 'insert_before' is assigned once and
is used once. Hence remove this local variable.

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Nitesh Shetty <nj.shetty@samsung.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Link: https://lore.kernel.org/r/20241212212941.1268662-2-bvanassche@acm.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/mq-deadline.c

index 91b3789f710e7a9b8ac3da53fa98632eff5f6abe..5528347b5fcfca3d5bda443f9a116e29b95dd0c1 100644 (file)
@@ -698,8 +698,6 @@ static void dd_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
                list_add(&rq->queuelist, &per_prio->dispatch);
                rq->fifo_time = jiffies;
        } else {
-               struct list_head *insert_before;
-
                deadline_add_rq_rb(per_prio, rq);
 
                if (rq_mergeable(rq)) {
@@ -712,8 +710,7 @@ static void dd_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
                 * set expire time and add to fifo list
                 */
                rq->fifo_time = jiffies + dd->fifo_expire[data_dir];
-               insert_before = &per_prio->fifo_list[data_dir];
-               list_add_tail(&rq->queuelist, insert_before);
+               list_add_tail(&rq->queuelist, &per_prio->fifo_list[data_dir]);
        }
 }