Commit 4149205c authored by Ben Walker's avatar Ben Walker Committed by Daniel Verkamp
Browse files

nvmf: Re-lookup sgroup after the array is realloc'd



Change-Id: I81c3f5725dc276717ab3d8316e393349b6a33134
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/408251


Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
parent 1d945364
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -630,6 +630,10 @@ spdk_nvmf_poll_group_resume_subsystem(struct spdk_nvmf_poll_group *group,
		return rc;
	}

	/* poll_group_update_subsystem may realloc the sgroups array. We need
	 * to do a new lookup to get the correct pointer. */
	sgroup = &group->sgroups[subsystem->id];

	sgroup->state = SPDK_NVMF_SUBSYSTEM_ACTIVE;

	/* Release all queued requests */