summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/target
diff options
context:
space:
mode:
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>2021-02-09 21:47:58 -0800
committerChristoph Hellwig <hch@lst.de>2021-02-10 16:38:05 +0100
commit07116ea50fd3a3b58725389e4abaf1c03bcae641 (patch)
treeed8ea692467d29e6647c6d5302ba2995e52a6577 /drivers/nvme/target
parent1c2c76136875d2329339275d431484a33dbb612d (diff)
downloadlinux-07116ea50fd3a3b58725389e4abaf1c03bcae641.tar.bz2
nvmet: use invalid cmd opcode helper
In the NVMeOF block device backend, file backend, and passthru backend we reject and report the commands if opcode is not handled. Use the previously introduced helper in the passthru backend to make the error message uniform. Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme/target')
-rw-r--r--drivers/nvme/target/passthru.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/target/passthru.c b/drivers/nvme/target/passthru.c
index cbc88acdd233..3b22f4a868f4 100644
--- a/drivers/nvme/target/passthru.c
+++ b/drivers/nvme/target/passthru.c
@@ -494,7 +494,7 @@ u16 nvmet_parse_passthru_admin_cmd(struct nvmet_req *req)
return nvmet_setup_passthru_command(req);
default:
/* Reject commands not in the allowlist above */
- return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
+ return nvmet_report_invalid_opcode(req);
}
}