Commit d62cdef0 authored by Seth Howell's avatar Seth Howell Committed by Tomasz Zawadzki
Browse files

lib/nvme: set child->parent to null in request_remove_child.



Not doing thsi was causing me to hit an assert in this funciton that was
caused by us erroneously calling into it from the error path of
_nvme_qpair_submit_request.

Signed-off-by: default avatarSeth Howell <seth.howell@intel.com>
Change-Id: I46a4d9ec543281d756cc4447d3e880a98f341092
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1121


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
parent 2248e521
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1043,6 +1043,7 @@ nvme_request_remove_child(struct nvme_request *parent, struct nvme_request *chil
	assert(parent->num_children != 0);

	parent->num_children--;
	child->parent = NULL;
	TAILQ_REMOVE(&parent->children, child, child_tailq);
}