• NeilBrown's avatar
    nfsd: Move error code mapping to per-version proc code. · 1459ad57
    NeilBrown authored
    There is code scattered around nfsd which chooses an error status based
    on the particular version of nfs being used.  It is cleaner to have the
    version specific choices in version specific code.
    
    With this patch common code returns the most specific error code
    possible and the version specific code maps that if necessary.
    
    Both v2 (nfsproc.c) and v3 (nfs3proc.c) now have a "map_status()"
    function which is called to map the resp->status before each non-trivial
    nfsd_proc_* or nfsd3_proc_* function returns.
    
    NFS4ERR_SYMLINK and NFS4ERR_WRONG_TYPE introduce extra complications and
    are left for a later patch.
    Signed-off-by: default avatarNeilBrown <neilb@suse.de>
    Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    1459ad57
vfs.c 64.7 KB