提交 8a82dbf1 编写于 作者: J James Smart 提交者: Christoph Hellwig

nvme-fc: fix iowait hang

Add missing iowait head initialization.
Fix irqsave vs irq: wait_event_lock_irq() doesn't do irq save/restore

Fixes: 36715cf4 ("nvme_fc: replace ioabort msleep loop with completion”)
Cc: <stable@vger.kernel.org> # 4.13
Signed-off-by: NJames Smart <james.smart@broadcom.com>
Reviewed-by: NSagi Grimberg <sagi@grimberg.me>
Reviewed-by: NHimanshu Madhani <himanshu.madhani@cavium.com>
Tested-by: NHimanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: NChristoph Hellwig <hch@lst.de>
上级 639812a1
...@@ -2545,10 +2545,10 @@ nvme_fc_delete_association(struct nvme_fc_ctrl *ctrl) ...@@ -2545,10 +2545,10 @@ nvme_fc_delete_association(struct nvme_fc_ctrl *ctrl)
nvme_fc_abort_aen_ops(ctrl); nvme_fc_abort_aen_ops(ctrl);
/* wait for all io that had to be aborted */ /* wait for all io that had to be aborted */
spin_lock_irqsave(&ctrl->lock, flags); spin_lock_irq(&ctrl->lock);
wait_event_lock_irq(ctrl->ioabort_wait, ctrl->iocnt == 0, ctrl->lock); wait_event_lock_irq(ctrl->ioabort_wait, ctrl->iocnt == 0, ctrl->lock);
ctrl->flags &= ~FCCTRL_TERMIO; ctrl->flags &= ~FCCTRL_TERMIO;
spin_unlock_irqrestore(&ctrl->lock, flags); spin_unlock_irq(&ctrl->lock);
nvme_fc_term_aen_ops(ctrl); nvme_fc_term_aen_ops(ctrl);
...@@ -2760,6 +2760,7 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts, ...@@ -2760,6 +2760,7 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,
ctrl->rport = rport; ctrl->rport = rport;
ctrl->dev = lport->dev; ctrl->dev = lport->dev;
ctrl->cnum = idx; ctrl->cnum = idx;
init_waitqueue_head(&ctrl->ioabort_wait);
get_device(ctrl->dev); get_device(ctrl->dev);
kref_init(&ctrl->ref); kref_init(&ctrl->ref);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册