]> git.baikalelectronics.ru Git - kernel.git/commit
SUNRPC: Fix xdr_encode_bool()
authorChuck Lever <chuck.lever@oracle.com>
Tue, 19 Jul 2022 13:18:35 +0000 (09:18 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Sat, 30 Jul 2022 00:08:56 +0000 (20:08 -0400)
commit6b5e749304b2eeeee57485c0afd80ead03e75184
treeec1d8c780b68c7c23d2c14841569cc1018d336dc
parent97b8590c0b1c2a6f7355db8477534d741cb27212
SUNRPC: Fix xdr_encode_bool()

I discovered that xdr_encode_bool() was returning the same address
that was passed in the @p parameter. The documenting comment states
that the intent is to return the address of the next buffer
location, just like the other "xdr_encode_*" helpers.

The result was the encoded results of NFSv3 PATHCONF operations were
not formed correctly.

Fixes: 4f4b13d588dc ("NFSD: Update the NFSv3 PATHCONF3res encoder to use struct xdr_stream")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
include/linux/sunrpc/xdr.h