]> git.baikalelectronics.ru Git - kernel.git/commit
SUNRPC: Avoid return code checking in rpcbind XDR encoder functions
authorChuck Lever <chuck.lever@oracle.com>
Tue, 14 Dec 2010 14:58:59 +0000 (14:58 +0000)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 16 Dec 2010 17:37:25 +0000 (12:37 -0500)
commit238a78df38cdeb7c99c89d63a892ac47a877ccfb
treee0ad1d8e560b19b8e214f69a2608eccd0f791423
parent991325ab50ea3386b054fbf35ea4f808980986cd
SUNRPC: Avoid return code checking in rpcbind XDR encoder functions

Clean up.

The trend in the other XDR encoder functions is to BUG() when encoding
problems occur, since a problem here is always due to a local coding
error.  Then, instead of a status, zero is unconditionally returned.

Update the rpcbind XDR encoders to behave this way.

To finish the update, use the new-style be32_to_cpup() and
cpu_to_be32() macros, and compute the buffer sizes using raw integers
instead of sizeof().  This matches the conventions used in other XDR
functions.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Tested-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/rpcb_clnt.c