1
0
Fork 0

nvmet: fix byte swap in nvmet_parse_io_cmd

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>
zero-colors
Christoph Hellwig 2017-03-31 17:00:08 +02:00 committed by Sagi Grimberg
parent 78ce3daa7d
commit 793c7ed9d7
1 changed files with 1 additions and 1 deletions

View File

@ -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: