projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
78ce3da
)
nvmet: fix byte swap in nvmet_parse_io_cmd
author
Christoph Hellwig
<hch@lst.de>
Fri, 31 Mar 2017 15:00:08 +0000
(17:00 +0200)
committer
Sagi Grimberg
<sagi@grimberg.me>
Sun, 2 Apr 2017 07:24:15 +0000
(10:24 +0300)
We need to do arithmetics after byte swapping, not before.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
drivers/nvme/target/io-cmd.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/nvme/target/io-cmd.c
b/drivers/nvme/target/io-cmd.c
index e37acd77b5fe90f717628116b328f91198c3e3f5..6b0baa9caab9fdf524944b0be6e8d011d05c552b 100644
(file)
--- a/
drivers/nvme/target/io-cmd.c
+++ b/
drivers/nvme/target/io-cmd.c
@@
-230,7
+230,7
@@
int nvmet_parse_io_cmd(struct nvmet_req *req)
return 0;
case nvme_cmd_dsm:
req->execute = nvmet_execute_dsm;
- req->data_len =
le32_to_cpu(cmd->dsm.nr
+ 1) *
+ req->data_len =
(le32_to_cpu(cmd->dsm.nr)
+ 1) *
sizeof(struct nvme_dsm_range);
return 0;
case nvme_cmd_write_zeroes: