diff options
author | NeilBrown <neilb@suse.de> | 2024-07-29 11:47:22 +1000 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2024-09-20 19:31:03 -0400 |
commit | 1459ad57673b8019fbfcfddc345c99630d29e716 (patch) | |
tree | 42538bc5c0e46ee6fc8f3caeac86b473dfe5bff7 /lib | |
parent | ef7f6c4904d03ccd7478e1ac20ed75f79c4ac444 (diff) |
nfsd: Move error code mapping to per-version proc code.
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: NeilBrown <neilb@suse.de>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions