projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a6a5149
)
nvme: check for a live controller in nvme_dev_open
author
Christoph Hellwig
<hch@lst.de>
Wed, 18 Oct 2017 15:09:31 +0000
(17:09 +0200)
committer
Christoph Hellwig
<hch@lst.de>
Fri, 27 Oct 2017 06:05:22 +0000
(09:05 +0300)
This is a much more sensible check than just the admin queue.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@rimbeg.me>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
drivers/nvme/host/core.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/nvme/host/core.c
b/drivers/nvme/host/core.c
index a56a1e0432e7becfdaa3d30cfd8510e4006caa9f..df525ab42fcd18c17bb55f4bbadb1dd52a12e1bf 100644
(file)
--- a/
drivers/nvme/host/core.c
+++ b/
drivers/nvme/host/core.c
@@
-1891,7
+1891,7
@@
static int nvme_dev_open(struct inode *inode, struct file *file)
struct nvme_ctrl *ctrl =
container_of(inode->i_cdev, struct nvme_ctrl, cdev);
- if (
!ctrl->admin_q
)
+ if (
ctrl->state != NVME_CTRL_LIVE
)
return -EWOULDBLOCK;
file->private_data = ctrl;
return 0;