Skip to content

Commit

Permalink
blk-mq: remove wrong 'unlikely' check
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
fshh520 authored and axboe committed May 22, 2018
1 parent 68fa9db commit b4f6f38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@ static bool dispatch_rq_from_ctx(struct sbitmap *sb, unsigned int bitnr,
struct blk_mq_ctx *ctx = hctx->ctxs[bitnr];

spin_lock(&ctx->lock);
if (unlikely(!list_empty(&ctx->rq_list))) {
if (!list_empty(&ctx->rq_list)) {
dispatch_data->rq = list_entry_rq(ctx->rq_list.next);
list_del_init(&dispatch_data->rq->queuelist);
if (list_empty(&ctx->rq_list))
Expand Down

0 comments on commit b4f6f38

Please sign in to comment.