Skip to content

Commit 278ab37

Browse files
author
Christoph Hellwig
committed
nvme-fabrics: handle the admin-only case properly in nvmf_check_ready
In the ADMIN_ONLY state we don't have any I/O queues, but we should accept all admin commands without further checks. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: James Smart <[email protected]>
1 parent 3bc32bb commit 278ab37

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/nvme/host/fabrics.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ bool __nvmf_check_ready(struct nvme_ctrl *ctrl, struct request *rq,
169169
static inline bool nvmf_check_ready(struct nvme_ctrl *ctrl, struct request *rq,
170170
bool queue_live)
171171
{
172-
if (likely(ctrl->state == NVME_CTRL_LIVE))
172+
if (likely(ctrl->state == NVME_CTRL_LIVE ||
173+
ctrl->state == NVME_CTRL_ADMIN_ONLY))
173174
return true;
174175
return __nvmf_check_ready(ctrl, rq, queue_live);
175176
}

0 commit comments

Comments
 (0)