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:
5ac5fcc
)
nvmet: fix byte swap in nvmet_execute_write_zeroes
author
Christoph Hellwig
<hch@lst.de>
Fri, 31 Mar 2017 15:00:07 +0000
(17:00 +0200)
committer
Sagi Grimberg
<sagi@grimberg.me>
Sun, 2 Apr 2017 07:24:15 +0000
(10:24 +0300)
The length field in the Write Zeroes command is a 16-bit field.
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 4195115c7e5493be02acc7b4daddbfd2427c831e..e37acd77b5fe90f717628116b328f91198c3e3f5 100644
(file)
--- a/
drivers/nvme/target/io-cmd.c
+++ b/
drivers/nvme/target/io-cmd.c
@@
-180,7
+180,7
@@
static void nvmet_execute_write_zeroes(struct nvmet_req *req)
sector = le64_to_cpu(write_zeroes->slba) <<
(req->ns->blksize_shift - 9);
- nr_sector = (((sector_t)le
32
_to_cpu(write_zeroes->length)) <<
+ nr_sector = (((sector_t)le
16
_to_cpu(write_zeroes->length)) <<
(req->ns->blksize_shift - 9)) + 1;
if (__blkdev_issue_zeroout(req->ns->bdev, sector, nr_sector,