Commit e7c43fea authored by Israel Rukshin's avatar Israel Rukshin Committed by Keith Busch

nvme: Use nvme_state_terminal helper

Improve code readability.
Reviewed-by: default avatarMax Gurtovoy <maxg@mellanox.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarIsrael Rukshin <israelr@mellanox.com>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
parent f41cfd5d
...@@ -2633,8 +2633,7 @@ static bool nvme_validate_cntlid(struct nvme_subsystem *subsys, ...@@ -2633,8 +2633,7 @@ static bool nvme_validate_cntlid(struct nvme_subsystem *subsys,
lockdep_assert_held(&nvme_subsystems_lock); lockdep_assert_held(&nvme_subsystems_lock);
list_for_each_entry(tmp, &subsys->ctrls, subsys_entry) { list_for_each_entry(tmp, &subsys->ctrls, subsys_entry) {
if (tmp->state == NVME_CTRL_DELETING || if (nvme_state_terminal(tmp))
tmp->state == NVME_CTRL_DEAD)
continue; continue;
if (tmp->cntlid == ctrl->cntlid) { if (tmp->cntlid == ctrl->cntlid) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment