NFS: Create an NFS v3 stat_to_errno()
Subsystems (2)
PATCH 1/2 NFS: Create an NFS v3 stat_to_errno()
From: Bryan Schumaker <[email protected]>
In theory, NFS v3 can have different error versions than NFS v2. v4 is already using its own nfs4_stat_to_errno() to mapp error codes, so rather than create something in the generic client for v2 and v3 to share I instead give v3 its own static function.
Signed-off-by Bryan Schumaker <[email protected]>
---
This can replace my "relocate stat to errno" patch sent earlier this afternoon.
fs/nfs/internal.h | 1 - fs/nfs/nfs2xdr.c | 3 +- fs/nfs/nfs3xdr.c | 103 +++++++++++++++++++++++++++++++++++++++++++---------- 3 files changed, 87 insertions(+), 20 deletions(-)
fs/nfs/internal.h +0 -1
@@ -211,7 +211,6 @@ extern int __init nfs_init_directcache(void);extern void nfs_destroy_directcache (void );/* nfs2xdr.c */ -extern int nfs_stat_to_errno (enum nfs_stat );extern struct rpc_procinfo nfs_procedures[];extern int nfs2_decode_dirent (struct xdr_stream *,struct nfs_entry *,int );
fs/nfs/nfs2xdr.c +2 -1
@@ -61,6 +61,7 @@#define NFS_readdirres_sz (1)#define NFS_statfsres_sz (1+NFS_info_sz) +static int nfs_stat_to_errno (enum nfs_stat );/* * While encoding arguments, set up the reply buffer in advance to
@@ -1109,7 +1110,7 @@ static const struct {* Returns a local errno value, or -EIO if the NFS status code is * not recognized. This function is used jointly by NFSv2 and NFSv3. */ -int nfs_stat_to_errno (enum nfs_stat status) +static int nfs_stat_to_errno (enum nfs_stat status) {int i;
fs/nfs/nfs3xdr.c +85 -18
221 lines not on this page · raw message
Signature · 1 line
1.7.9.4