nvme: Fix remove event processing bug

This patch fixes bug introduced by this patch:
59237d22b8

lib/nvme/nvme_pcie.c:
ctrlr->remove_cb(ctrlr->cb_ctx, ctrlr) (line 147) -> ctrlr->remove_cb(cb_ctx, ctrlr) (line 123)

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I84c56aa7480fd597287f4935a583983eb96bc422
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8705
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Maciej Szwed 2021-07-07 22:09:53 +02:00 committed by Tomasz Zawadzki
parent 13eb8f2fb3
commit 599303624e

View File

@ -120,7 +120,7 @@ _nvme_pcie_event_process(struct spdk_pci_event *event, void *cb_ctx)
/* get the user app to clean up and stop I/O */
if (ctrlr->remove_cb) {
nvme_robust_mutex_unlock(&g_spdk_nvme_driver->lock);
ctrlr->remove_cb(cb_ctx, ctrlr);
ctrlr->remove_cb(ctrlr->cb_ctx, ctrlr);
nvme_robust_mutex_lock(&g_spdk_nvme_driver->lock);
}
}