diff options
author | Minwoo Im <minwoo.im.dev@gmail.com> | 2019-06-06 07:30:14 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2019-06-21 11:08:38 +0200 |
commit | 7a1f46e3f75cff5042dfa1bb80c9929a0e412abc (patch) | |
tree | 0c6ca63c8514e435d59ff4cd2904e44c3f37ec26 /drivers/nvme/target/fabrics-cmd.c | |
parent | nvme: export get and set features (diff) | |
download | linux-7a1f46e3f75cff5042dfa1bb80c9929a0e412abc.tar.xz linux-7a1f46e3f75cff5042dfa1bb80c9929a0e412abc.zip |
nvme: introduce nvme_is_fabrics to check fabrics cmd
This patch introduces a nvme_is_fabrics() inline function to check
whether or not the given command structure is for fabrics.
Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/target/fabrics-cmd.c')
-rw-r--r-- | drivers/nvme/target/fabrics-cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/target/fabrics-cmd.c b/drivers/nvme/target/fabrics-cmd.c index 3b9f79aba98f..d16b55ffe79f 100644 --- a/drivers/nvme/target/fabrics-cmd.c +++ b/drivers/nvme/target/fabrics-cmd.c @@ -268,7 +268,7 @@ u16 nvmet_parse_connect_cmd(struct nvmet_req *req) { struct nvme_command *cmd = req->cmd; - if (cmd->common.opcode != nvme_fabrics_command) { + if (!nvme_is_fabrics(cmd)) { pr_err("invalid command 0x%x on unconnected queue.\n", cmd->fabrics.opcode); req->error_loc = offsetof(struct nvme_common_command, opcode); |