mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 08:00:52 +07:00
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
@ -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 New Issue
Block a user