aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/nvme/host/core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index bb39b91253c2..3cf1b773158e 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3314,6 +3314,9 @@ void nvme_remove_namespaces(struct nvme_ctrl *ctrl)
3314 struct nvme_ns *ns, *next; 3314 struct nvme_ns *ns, *next;
3315 LIST_HEAD(ns_list); 3315 LIST_HEAD(ns_list);
3316 3316
3317 /* prevent racing with ns scanning */
3318 flush_work(&ctrl->scan_work);
3319
3317 /* 3320 /*
3318 * The dead states indicates the controller was not gracefully 3321 * The dead states indicates the controller was not gracefully
3319 * disconnected. In that case, we won't be able to flush any data while 3322 * disconnected. In that case, we won't be able to flush any data while
@@ -3476,7 +3479,6 @@ void nvme_stop_ctrl(struct nvme_ctrl *ctrl)
3476 nvme_mpath_stop(ctrl); 3479 nvme_mpath_stop(ctrl);
3477 nvme_stop_keep_alive(ctrl); 3480 nvme_stop_keep_alive(ctrl);
3478 flush_work(&ctrl->async_event_work); 3481 flush_work(&ctrl->async_event_work);
3479 flush_work(&ctrl->scan_work);
3480 cancel_work_sync(&ctrl->fw_act_work); 3482 cancel_work_sync(&ctrl->fw_act_work);
3481 if (ctrl->ops->stop_ctrl) 3483 if (ctrl->ops->stop_ctrl)
3482 ctrl->ops->stop_ctrl(ctrl); 3484 ctrl->ops->stop_ctrl(ctrl);