nvmet: switch check for subsystem type
authorHannes Reinecke <hare@suse.de>
Mon, 18 Oct 2021 15:21:36 +0000 (17:21 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 27 Oct 2021 06:03:30 +0000 (08:03 +0200)
Invert the check for discovery subsystem type to allow for additional
discovery subsystem types.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/nvmet.h

index f31dcc4..af19342 100644 (file)
@@ -579,7 +579,7 @@ static inline struct nvmet_subsys *nvmet_req_subsys(struct nvmet_req *req)
 
 static inline bool nvmet_is_disc_subsys(struct nvmet_subsys *subsys)
 {
-    return subsys->type == NVME_NQN_DISC;
+    return subsys->type != NVME_NQN_NVME;
 }
 
 #ifdef CONFIG_NVME_TARGET_PASSTHRU