Skip to content

Commit

Permalink
nvmet: Call fatal_error from keep-alive timout expiration
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sagi Grimberg committed Jan 26, 2017
1 parent 06406d8 commit 23a8ed4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nvme/target/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 23a8ed4

Please sign in to comment.