NFSD: Hoist status code encoding into XDR encoder functions
The original intent was presumably to reduce code duplication. The trade-off was: - No support for an NFSD proc function returning a non-success RPC accept_stat value. - No support for void NFS replies to non-NULL procedures. - Everyone pays for the deduplication with a few extra conditional branches in a hot path. In addition, nfsd_dispatch() leaves *statp uninitialized in the success path, unlike svc_generic_dispatch(). Address all of these problems by moving the logic for encoding the NFS status code into the NFS XDR encoders themselves. Then update the NFS .pc_func methods to return an RPC accept_stat value. Signed-off-by:Chuck Lever <chuck.lever@oracle.com> Signed-off-by:
J. Bruce Fields <bfields@redhat.com>
parent
4b74fd79
No related branches found
No related tags found
Showing
- fs/nfsd/nfs2acl.c 12 additions, 7 deletionsfs/nfsd/nfs2acl.c
- fs/nfsd/nfs3acl.c 5 additions, 4 deletionsfs/nfsd/nfs3acl.c
- fs/nfsd/nfs3proc.c 22 additions, 22 deletionsfs/nfsd/nfs3proc.c
- fs/nfsd/nfs3xdr.c 15 additions, 4 deletionsfs/nfsd/nfs3xdr.c
- fs/nfsd/nfs4proc.c 3 additions, 4 deletionsfs/nfsd/nfs4proc.c
- fs/nfsd/nfs4xdr.c 2 additions, 3 deletionsfs/nfsd/nfs4xdr.c
- fs/nfsd/nfsproc.c 57 additions, 56 deletionsfs/nfsd/nfsproc.c
- fs/nfsd/nfssvc.c 5 additions, 16 deletionsfs/nfsd/nfssvc.c
- fs/nfsd/nfsxdr.c 19 additions, 4 deletionsfs/nfsd/nfsxdr.c
- fs/nfsd/xdr.h 5 additions, 0 deletionsfs/nfsd/xdr.h
Loading
Please register or sign in to comment