Commit 18479ddb authored by Kanchan Joshi's avatar Kanchan Joshi Committed by Christoph Hellwig

nvme: reduce checks for zero command effects

For passthrough I/O commands, effects are usually to be zero.
nvme_passthrough_end() does three checks in futility for this case.
Bail out of function-call/checks.
Signed-off-by: default avatarKanchan Joshi <joshi.k@samsung.com>
Reviewed-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 2bd64307
...@@ -1137,7 +1137,8 @@ void nvme_execute_passthru_rq(struct request *rq) ...@@ -1137,7 +1137,8 @@ void nvme_execute_passthru_rq(struct request *rq)
effects = nvme_passthru_start(ctrl, ns, cmd->common.opcode); effects = nvme_passthru_start(ctrl, ns, cmd->common.opcode);
blk_execute_rq(disk, rq, 0); blk_execute_rq(disk, rq, 0);
nvme_passthru_end(ctrl, effects); if (effects) /* nothing to be done for zero cmd effects */
nvme_passthru_end(ctrl, effects);
} }
EXPORT_SYMBOL_NS_GPL(nvme_execute_passthru_rq, NVME_TARGET_PASSTHRU); EXPORT_SYMBOL_NS_GPL(nvme_execute_passthru_rq, NVME_TARGET_PASSTHRU);
......
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