]> git.baikalelectronics.ru Git - kernel.git/commit
staging: lustre: lnet: use correct 'magic' test
authorJustin Skists <j.skists@gmail.com>
Wed, 21 Mar 2018 19:53:09 +0000 (19:53 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Mar 2018 17:15:35 +0000 (18:15 +0100)
commit7adafd4977da64efb760961d5a7a0eef6ab24d7e
tree1d23ed718d1c57abfd1cb38afc79d47165b16861
parent3b7c59614a4f3915a91ba88ee9c239b5f99d37a7
staging: lustre: lnet: use correct 'magic' test

Use the lnet_magic_accept() function to compare 'magic' against
LNET_PROTO_TCP_MAGIC for the appropriate string for an error message.

The original fix removed an unneeded byte-ordering cast because the define
was already CPU byte-ordered and it was assumed that 'magic' was CPU
byte-ordered, too.

Now modify the if-statement to use the appropriate lnet_accept_magic()
function in order to be consistent with similar tests. This will allow
the code to be consistent with the general understanding that 'magic'
should be in host-byte-order for the peer that sent the message.

Fixes: 4a66594fd9ea ("staging: lustre: Fix unneeded byte-ordering cast")
Signed-off-by: Justin Skists <j.skists@gmail.com>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/lnet/acceptor.c