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>
This commit is contained in:
parent
78ce3daa7d
commit
793c7ed9d7
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue