Skip to content

Commit

Permalink
nvmf: add an assert for the obtained sgroup
Browse files Browse the repository at this point in the history
Change-Id: Ie00137083143722e9df50fa5a8e4d37000dfe29c
Signed-off-by: GangCao <[email protected]>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8739
Reviewed-by: Xiaodong Liu <[email protected]>
Reviewed-by: Shuhei Matsumoto <[email protected]>
Reviewed-by: <[email protected]>
Reviewed-by: Aleksey Marchuk <[email protected]>
Community-CI: Broadcom CI <[email protected]>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <[email protected]>
  • Loading branch information
Comphix authored and tomzawadzki committed Jul 13, 2021
1 parent 5993036 commit bd4aec1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/nvmf/ctrlr.c
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,7 @@ retry_connect(void *arg)
int rc;

sgroup = nvmf_subsystem_pg_from_connect_cmd(req);
assert(sgroup != NULL);
sgroup->mgmt_io_outstanding++;
spdk_poller_unregister(&req->poller);
rc = nvmf_ctrlr_cmd_connect(req);
Expand Down Expand Up @@ -861,6 +862,7 @@ nvmf_ctrlr_cmd_connect(struct spdk_nvmf_request *req)
* subsystem waiting for this command to complete before unpausing.
*/
sgroup = nvmf_subsystem_pg_from_connect_cmd(req);
assert(sgroup != NULL);
sgroup->mgmt_io_outstanding--;
SPDK_DEBUGLOG(nvmf, "Subsystem '%s' is not ready for connect, retrying...\n", subsystem->subnqn);
req->poller = SPDK_POLLER_REGISTER(retry_connect, req, 100);
Expand Down

0 comments on commit bd4aec1

Please sign in to comment.