diff options
author | Hannes Reinecke <hare@suse.de> | 2021-09-22 08:35:21 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2021-10-20 19:16:02 +0200 |
commit | a294711ed5123f757ed8ed2f103c851b8ee416c9 (patch) | |
tree | fcb3968a5d09620f3fc7a926f4a0c8c82ee9eeee /drivers/nvme/target/admin-cmd.c | |
parent | nvme: add CNTRLTYPE definitions for 'identify controller' (diff) | |
download | linux-a294711ed5123f757ed8ed2f103c851b8ee416c9.tar.xz linux-a294711ed5123f757ed8ed2f103c851b8ee416c9.zip |
nvmet: add nvmet_is_disc_subsys() helper
Add a helper function to determine if a given subsystem is a discovery
subsystem.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/target/admin-cmd.c')
-rw-r--r-- | drivers/nvme/target/admin-cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c index aa6d84d8848e..b653ea4244fe 100644 --- a/drivers/nvme/target/admin-cmd.c +++ b/drivers/nvme/target/admin-cmd.c @@ -1008,7 +1008,7 @@ u16 nvmet_parse_admin_cmd(struct nvmet_req *req) if (nvme_is_fabrics(cmd)) return nvmet_parse_fabrics_cmd(req); - if (nvmet_req_subsys(req)->type == NVME_NQN_DISC) + if (nvmet_is_disc_subsys(nvmet_req_subsys(req))) return nvmet_parse_discovery_cmd(req); ret = nvmet_check_ctrl_status(req); |