diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c index 65bc1efa33d6..30177f42a2aa 100644 --- a/drivers/nvme/target/core.c +++ b/drivers/nvme/target/core.c @@ -1471,7 +1471,7 @@ static void nvmet_ctrl_free(struct kref *ref) nvmet_stop_keep_alive_timer(ctrl); - flush_work(&ctrl->async_event_work); + cancel_work_sync(&ctrl->async_event_work); cancel_work_sync(&ctrl->fatal_err_work); ida_simple_remove(&cntlid_ida, ctrl->cntlid);