mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
nvme: use ctrl state accessor
The ctrl->state value is updated in another thread using WRITE_ONCE, so ensure all the readers use the appropriate accessor. Reviewed-by: Sagi Grimberg <sagi@grmberg.me> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
This commit is contained in:
@@ -897,7 +897,7 @@ static void nvme_ctrl_auth_work(struct work_struct *work)
|
||||
* If the ctrl is no connected, bail as reconnect will handle
|
||||
* authentication.
|
||||
*/
|
||||
if (ctrl->state != NVME_CTRL_LIVE)
|
||||
if (nvme_ctrl_state(ctrl) != NVME_CTRL_LIVE)
|
||||
return;
|
||||
|
||||
/* Authenticate admin queue first */
|
||||
|
||||
Reference in New Issue
Block a user