Skip to content

Commit

Permalink
nvmet: use req->cmd directly in file-ns fast path
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
  • Loading branch information
ChaitanayaKulkarni authored and Christoph Hellwig committed Jun 17, 2021
1 parent 46eca47 commit f3dce2a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/nvme/target/io-cmd-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f3dce2a

Please sign in to comment.