nvme: Release lock before calling remove_cb
This prevents a deadlock if the user immediately calls spdk_nvme_detach. Change-Id: I79f28abe163cbbf184bea907692c44aa4e1c8893 Signed-off-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
913257cba5
commit
2e82b58684
@ -273,7 +273,9 @@ _nvme_pcie_hotplug_monitor(void *cb_ctx, spdk_nvme_probe_cb probe_cb,
|
||||
|
||||
/* get the user app to clean up and stop I/O */
|
||||
if (remove_cb) {
|
||||
nvme_robust_mutex_unlock(&g_spdk_nvme_driver->lock);
|
||||
remove_cb(cb_ctx, ctrlr);
|
||||
nvme_robust_mutex_lock(&g_spdk_nvme_driver->lock);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user