diff options
author | Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> | 2021-06-13 18:58:46 -0700 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2021-06-17 15:51:20 +0200 |
commit | 46eca4702d93dbb8ac1c8fa84e5838fc8a1e82a0 (patch) | |
tree | 5c7706dfa5dfe17cc4bb412bad6ac71697936286 /drivers/nvme | |
parent | 87fd4cc1c0dda038c9a3617c9d07d5159326e80f (diff) |
nvmet: use req->cmd directly in bdev-ns fast path
The function nvmet_bdev_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 <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/target/io-cmd-bdev.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/nvme/target/io-cmd-bdev.c b/drivers/nvme/target/io-cmd-bdev.c index f673679d258a..5d998e5873d3 100644 --- a/drivers/nvme/target/io-cmd-bdev.c +++ b/drivers/nvme/target/io-cmd-bdev.c @@ -429,9 +429,7 @@ static void nvmet_bdev_execute_write_zeroes(struct nvmet_req *req) u16 nvmet_bdev_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_bdev_execute_rw; |