Commit 03305949 authored by GangCao's avatar GangCao Committed by Daniel Verkamp
Browse files

nvmf: only pass the msg to initialized thread



Change-Id: I73cf34e0184f67a855afe980f5645df25baf4714
Signed-off-by: default avatarGangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/377652


Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 985aaa98
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -69,8 +69,9 @@ spdk_nvmf_request_complete(struct spdk_nvmf_request *req)
{
	struct spdk_nvme_cmd *cmd = &req->cmd->nvme_cmd;

	if (cmd->opc == SPDK_NVME_OPC_FABRIC ||
	    req->qpair->type == QPAIR_TYPE_AQ) {
	if ((cmd->opc == SPDK_NVME_OPC_FABRIC ||
	     req->qpair->type == QPAIR_TYPE_AQ) &&
	    req->qpair->thread) {
		/* Pass a message back to the originating thread. */
		spdk_thread_send_msg(req->qpair->thread,
				     spdk_nvmf_request_complete_on_qpair,