Commit c770f31d authored by Chuck Lever's avatar Chuck Lever
Browse files

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: ded04a58 ("NFSD: Update the NFSv3 PATHCONF3res encoder to use struct xdr_stream")
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
parent 23ba98de
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -419,8 +419,8 @@ static inline int xdr_stream_encode_item_absent(struct xdr_stream *xdr)
 */
static inline __be32 *xdr_encode_bool(__be32 *p, u32 n)
{
	*p = n ? xdr_one : xdr_zero;
	return p++;
	*p++ = n ? xdr_one : xdr_zero;
	return p;
}

/**