Commit 093d5479 authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Gerrit Code Review
Browse files

spdk_nvme_ns_cmd_reservation_report: fix request allocation



payload here is a pointer to the buffer, not a struct nvme_payload.

Use nvme_allocate_request_contig() and pass the length in bytes rather
than dwords.

Change-Id: Idbbb3614b1d69148fe041d26e0c148bd9ce53724
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 959bc24b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -462,7 +462,7 @@ spdk_nvme_ns_cmd_reservation_report(struct spdk_nvme_ns *ns, void *payload,
		return EINVAL;
	num_dwords = len / 4;

	req = nvme_allocate_request(payload, num_dwords, cb_fn, cb_arg);
	req = nvme_allocate_request_contig(payload, len, cb_fn, cb_arg);
	if (req == NULL) {
		return ENOMEM;
	}