nvmet: use unlikely for req status check

This patch adds unlikely in the nvmet request completion path for the
status check in the low level function __nvmet_req_complete.
This is helpful in the scenario where host and target connection is
working smoothly.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Chaitanya Kulkarni 2018-11-19 13:35:30 -08:00 committed by Jens Axboe
parent ad1f824948
commit cb019da3da
1 changed files with 1 additions and 1 deletions

View File

@ -617,7 +617,7 @@ static void __nvmet_req_complete(struct nvmet_req *req, u16 status)
nvmet_update_sq_head(req);
req->rsp->sq_id = cpu_to_le16(req->sq->qid);
req->rsp->command_id = req->cmd->common.command_id;
if (status)
if (unlikely(status))
nvmet_set_status(req, status);
if (req->ns)
nvmet_put_namespace(req->ns);