Message ID | 20241119002815.600608-10-bvanassche@acm.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Improve write performance for zoned UFS devices | expand |
On 11/19/24 09:27, Bart Van Assche wrote: > 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. > > Signed-off-by: Bart Van Assche <bvanassche@acm.org> Looks good. Reviewed-by: Damien Le Moal <dlemoal@kernel.org> This patch can be sent separately from this series I think. It does not really belong here, no ? > --- > block/mq-deadline.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/block/mq-deadline.c b/block/mq-deadline.c > index acdc28756d9d..2edf84b1bc2a 100644 > --- a/block/mq-deadline.c > +++ b/block/mq-deadline.c > @@ -699,8 +699,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)) { > @@ -713,8 +711,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]); > } > } >
On 11/18/24 11:38 PM, Damien Le Moal wrote: > On 11/19/24 09:27, Bart Van Assche wrote: >> 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. >> >> Signed-off-by: Bart Van Assche <bvanassche@acm.org> > > Looks good. > > Reviewed-by: Damien Le Moal <dlemoal@kernel.org> > > This patch can be sent separately from this series I think. It does not really > belong here, no ? Thanks for the review. There is another mq-deadline change in this series that depends on this change ("blk-mq: Restore the zoned write order when requeuing"). This is why I included this patch in this series. Bart.
diff --git a/block/mq-deadline.c b/block/mq-deadline.c index acdc28756d9d..2edf84b1bc2a 100644 --- a/block/mq-deadline.c +++ b/block/mq-deadline.c @@ -699,8 +699,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)) { @@ -713,8 +711,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]); } }
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. Signed-off-by: Bart Van Assche <bvanassche@acm.org> --- block/mq-deadline.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)