nvme_fuzz: simplify register_ns()

We can just always do the TAILQ_INITs for admin
related TAILQs.  Also no need to set anything to
NULL since the buffer was allocated using calloc.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ifbbda0436e7f33e225cf14dbd103779080b106da
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9729
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Jim Harris 2021-10-04 23:16:21 +00:00 committed by Tomasz Zawadzki
parent 3ca8b72c9e
commit 355604bfb0

View File

@ -580,11 +580,8 @@ register_ns(struct spdk_nvme_ctrlr *ctrlr, struct spdk_nvme_ns *ns, uint32_t nsi
TAILQ_INIT(&ns_entry->io_qp.free_ctx_objs);
TAILQ_INIT(&ns_entry->io_qp.outstanding_ctx_objs);
if (g_run_admin_commands) {
ns_entry->a_qp.qpair = NULL;
TAILQ_INIT(&ns_entry->a_qp.free_ctx_objs);
TAILQ_INIT(&ns_entry->a_qp.outstanding_ctx_objs);
}
TAILQ_INIT(&ns_entry->a_qp.free_ctx_objs);
TAILQ_INIT(&ns_entry->a_qp.outstanding_ctx_objs);
TAILQ_INSERT_TAIL(&g_ns_list, ns_entry, tailq);
}