* [PATCH for-next] blk-mq: fix redundant check of !e expression
@ 2021-10-29 20:29 Jεan Sacren
2021-10-30 15:35 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: Jεan Sacren @ 2021-10-29 20:29 UTC (permalink / raw)
To: axboe, linux-block
From: Jean Sacren <sakiwit@gmail.com>
In the if branch, e is checked. In the else branch, ->dispatch_busy is
merely a number and has no effect on !e. We should remove the check of
!e since it is always true.
Signed-off-by: Jean Sacren <sakiwit@gmail.com>
---
block/blk-mq-sched.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
index 0f006cabfd91..a38d4dd32516 100644
--- a/block/blk-mq-sched.c
+++ b/block/blk-mq-sched.c
@@ -502,7 +502,7 @@ void blk_mq_sched_insert_requests(struct blk_mq_hw_ctx *hctx,
* busy in case of 'none' scheduler, and this way may save
* us one extra enqueue & dequeue to sw queue.
*/
- if (!hctx->dispatch_busy && !e && !run_queue_async) {
+ if (!hctx->dispatch_busy && !run_queue_async) {
blk_mq_try_issue_list_directly(hctx, list);
if (list_empty(list))
goto out;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH for-next] blk-mq: fix redundant check of !e expression
2021-10-29 20:29 [PATCH for-next] blk-mq: fix redundant check of !e expression Jεan Sacren
@ 2021-10-30 15:35 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2021-10-30 15:35 UTC (permalink / raw)
To: Jεan Sacren, linux-block
On 10/29/21 2:29 PM, Jεan Sacren wrote:
> From: Jean Sacren <sakiwit@gmail.com>
>
> In the if branch, e is checked. In the else branch, ->dispatch_busy is
> merely a number and has no effect on !e. We should remove the check of
> !e since it is always true.
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-30 15:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29 20:29 [PATCH for-next] blk-mq: fix redundant check of !e expression Jεan Sacren
2021-10-30 15:35 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).