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:
parent
3ca8b72c9e
commit
355604bfb0
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user