diff options
author | Sagi Grimberg <sagi@grimberg.me> | 2017-10-11 12:49:51 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-10-18 19:29:39 +0200 |
commit | 0ad0bfa29822904b9186a1c04dbfb3014bc5dc8a (patch) | |
tree | 802d274e719dff71de1330232ab713f3259ae01a /drivers/nvme/host/rdma.c | |
parent | 5013e98b5e8db50144e8f1ca5a96aed95d4d48a0 (diff) | |
download | lwn-0ad0bfa29822904b9186a1c04dbfb3014bc5dc8a.tar.gz lwn-0ad0bfa29822904b9186a1c04dbfb3014bc5dc8a.zip |
nvme-rdma: stop controller reset if the controller is deleting
If the controller is deleting (in case the user decided to delete it), we
have no point to continue reset sequence.
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/host/rdma.c')
-rw-r--r-- | drivers/nvme/host/rdma.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c index ff67375982fe..34d22ff42afb 100644 --- a/drivers/nvme/host/rdma.c +++ b/drivers/nvme/host/rdma.c @@ -1818,7 +1818,11 @@ static void nvme_rdma_reset_ctrl_work(struct work_struct *work) } changed = nvme_change_ctrl_state(&ctrl->ctrl, NVME_CTRL_LIVE); - WARN_ON_ONCE(!changed); + if (!changed) { + /* state change failure is ok if we're in DELETING state */ + WARN_ON_ONCE(ctrl->ctrl.state != NVME_CTRL_DELETING); + return; + } nvme_start_ctrl(&ctrl->ctrl); |