]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
nvmet: Call fatal_error from keep-alive timout expiration
authorSagi Grimberg <sagi@grimberg.me>
Sun, 1 Jan 2017 11:18:26 +0000 (13:18 +0200)
committerSagi Grimberg <sagi@grimberg.me>
Thu, 26 Jan 2017 15:45:03 +0000 (17:45 +0200)
We only need to call delete_ctrl once, so given that both
keep-alive timeout and any other fatal error can trigger it,
just make sure we only call delete_ctrl once.

Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/core.c

index a327a43f81666a103a3af4fbafe95a74a4449349..fc5ba2f9e15f47fe8bd13795bdb9d6caaa532b93 100644 (file)
@@ -200,7 +200,7 @@ static void nvmet_keep_alive_timer(struct work_struct *work)
        pr_err("ctrl %d keep-alive timer (%d seconds) expired!\n",
                ctrl->cntlid, ctrl->kato);
 
-       ctrl->ops->delete_ctrl(ctrl);
+       nvmet_ctrl_fatal_error(ctrl);
 }
 
 static void nvmet_start_keep_alive_timer(struct nvmet_ctrl *ctrl)