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

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
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1137,6 +1137,7 @@ void nvme_execute_passthru_rq(struct request *rq)

	effects = nvme_passthru_start(ctrl, ns, cmd->common.opcode);
	blk_execute_rq(disk, rq, 0);
	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);