nvme: Fix the problem of callback failure during hot plugging

Signed-off-by: suhua1 <suhua1@kingsoft.com>
Change-Id: Iba8afdfcf4d90245ab1aa700b12cb9c375c4fe76
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5855
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
suhua1 2021-01-11 10:40:29 +08:00 committed by Tomasz Zawadzki
parent fab40895ab
commit 6d306ae59f

View File

@ -1469,7 +1469,7 @@ spdk_nvme_ctrlr_set_remove_cb(struct spdk_nvme_ctrlr *ctrlr,
}
nvme_robust_mutex_lock(&ctrlr->ctrlr_lock);
ctrlr->remove_cb = remove_ctx;
ctrlr->remove_cb = remove_cb;
ctrlr->cb_ctx = remove_ctx;
nvme_robust_mutex_unlock(&ctrlr->ctrlr_lock);
}