Commit b386a3a9 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Tomasz Zawadzki
Browse files

lib/scsi: Assert if ref count of task goes negative



We didn't have any check if ref count of SCSI task doesn't go negative.
This addition will verify the idea to LUN hotplug issue by subsequent
patches.

Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Signed-off-by: default avatarZiye Yang <ziye.yang@intel.com>
Change-Id: I1d6ca9b9439bc7c4b701b65cc004cdf5cae16e91
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473585


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>
parent 3d8c12a1
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ spdk_scsi_task_put(struct spdk_scsi_task *task)
		return;
	}

	assert(task->ref > 0);
	task->ref--;

	if (task->ref == 0) {