Commit cc3d4671 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Keith Busch
Browse files

nvmet: add a missing endianess conversion in nvmet_execute_admin_connect



The kato field is little endian on the wire, but native endian in
the in-core structure, add the missing byte swap.

Fixes: 62027831 ("nvmet: Improve nvmet_alloc_ctrl() interface and implementation")
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
parent 7bf6b497
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -287,7 +287,7 @@ static void nvmet_execute_admin_connect(struct nvmet_req *req)
	args.subsysnqn = d->subsysnqn;
	args.hostnqn = d->hostnqn;
	args.hostid = &d->hostid;
	args.kato = c->kato;
	args.kato = le32_to_cpu(c->kato);

	ctrl = nvmet_alloc_ctrl(&args);
	if (!ctrl)