NFSD: Extract the svcxdr_init_encode() helper
NFSD initializes an encode xdr_stream only after the RPC layer has
already inserted the RPC Reply header. Thus it behaves differently
than xdr_init_encode does, which assumes the passed-in xdr_buf is
entirely devoid of content.
nfs4proc.c has this server-side stream initialization helper, but
it is visible only to the NFSv4 code. Move this helper to a place
that can be accessed by NFSv2 and NFSv3 server XDR functions.
Signed-off-by:
Chuck Lever <chuck.lever@oracle.com>
Showing
- fs/nfsd/nfs4proc.c 8 additions, 23 deletionsfs/nfsd/nfs4proc.c
- fs/nfsd/nfs4state.c 3 additions, 3 deletionsfs/nfsd/nfs4state.c
- fs/nfsd/nfs4xdr.c 55 additions, 55 deletionsfs/nfsd/nfs4xdr.c
- fs/nfsd/nfssvc.c 2 additions, 2 deletionsfs/nfsd/nfssvc.c
- fs/nfsd/xdr4.h 1 addition, 1 deletionfs/nfsd/xdr4.h
- include/linux/sunrpc/svc.h 25 additions, 0 deletionsinclude/linux/sunrpc/svc.h
Please register or sign in to comment