mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 04:04:06 +00:00
SUNRPC: Fix xdr_encode_bool()
commitc770f31d8f
upstream. 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:ded04a587f
("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
3e9c0c4f16
commit
7cfa117563
1 changed files with 2 additions and 2 deletions
|
@ -405,8 +405,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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue