Commit 1fead718 authored by André Almeida's avatar André Almeida Committed by Jens Axboe

blk-mq: remove needless goto from blk_mq_get_driver_tag

The only usage of the label "done" is when (rq->tag != -1) at the
beginning of the function. Rather than jumping to label, we can just
remove this label and execute the code at the "if". Besides that, the
code that would be executed after the label "done" is the return of the
logical expression (rq->tag != -1) but since we are already inside the
if, we now that this is true. Remove the label and replace the goto with
the proper result of the label.
Signed-off-by: default avatarAndré Almeida <andrealmeid@collabora.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 993e4cde
...@@ -1036,7 +1036,7 @@ bool blk_mq_get_driver_tag(struct request *rq) ...@@ -1036,7 +1036,7 @@ bool blk_mq_get_driver_tag(struct request *rq)
bool shared; bool shared;
if (rq->tag != -1) if (rq->tag != -1)
goto done; return true;
if (blk_mq_tag_is_reserved(data.hctx->sched_tags, rq->internal_tag)) if (blk_mq_tag_is_reserved(data.hctx->sched_tags, rq->internal_tag))
data.flags |= BLK_MQ_REQ_RESERVED; data.flags |= BLK_MQ_REQ_RESERVED;
...@@ -1051,7 +1051,6 @@ bool blk_mq_get_driver_tag(struct request *rq) ...@@ -1051,7 +1051,6 @@ bool blk_mq_get_driver_tag(struct request *rq)
data.hctx->tags->rqs[rq->tag] = rq; data.hctx->tags->rqs[rq->tag] = rq;
} }
done:
return rq->tag != -1; return rq->tag != -1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment