Skip to content

Commit b4f6f38

Browse files
fshh520axboe
authored andcommitted
blk-mq: remove wrong 'unlikely' check
When dispatch_rq_from_ctx is called, in the vast majority of cases the ctx->rq_list is not empty. Signed-off-by: huhai <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 68fa9db commit b4f6f38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block/blk-mq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,7 @@ static bool dispatch_rq_from_ctx(struct sbitmap *sb, unsigned int bitnr,
10361036
struct blk_mq_ctx *ctx = hctx->ctxs[bitnr];
10371037

10381038
spin_lock(&ctx->lock);
1039-
if (unlikely(!list_empty(&ctx->rq_list))) {
1039+
if (!list_empty(&ctx->rq_list)) {
10401040
dispatch_data->rq = list_entry_rq(ctx->rq_list.next);
10411041
list_del_init(&dispatch_data->rq->queuelist);
10421042
if (list_empty(&ctx->rq_list))

0 commit comments

Comments
 (0)