From: Chaitanya Kulkarni Date: Mon, 14 Jun 2021 01:58:47 +0000 (-0700) Subject: nvmet: use req->cmd directly in file-ns fast path X-Git-Tag: for-5.14/drivers-2021-06-29^2~14 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=f3dce2add3e1a06f4e16616408aa70bf2f7c8431;p=linux-block.git nvmet: use req->cmd directly in file-ns fast path The function nvmet_file_parse_io_cmd() is called from the fast path. The local variable to that function cmd is only used once. Remove the local variable and use req->cmd directly. Signed-off-by: Chaitanya Kulkarni Signed-off-by: Christoph Hellwig --- diff --git a/drivers/nvme/target/io-cmd-file.c b/drivers/nvme/target/io-cmd-file.c index 7fdbdc496597..1dd1a0fe2e81 100644 --- a/drivers/nvme/target/io-cmd-file.c +++ b/drivers/nvme/target/io-cmd-file.c @@ -385,9 +385,7 @@ static void nvmet_file_execute_write_zeroes(struct nvmet_req *req) u16 nvmet_file_parse_io_cmd(struct nvmet_req *req) { - struct nvme_command *cmd = req->cmd; - - switch (cmd->common.opcode) { + switch (req->cmd->common.opcode) { case nvme_cmd_read: case nvme_cmd_write: req->execute = nvmet_file_execute_rw;