aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/internal.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2010-12-14 09:58:11 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-12-16 12:37:24 -0500
commit573c4e1ef53a6b891b73cc2257e1604da754a2e4 (patch)
treeb1e01ca46472ac6c936c4a144c3a160d8e1595bb /fs/nfs/internal.h
parent8111f373600cd43b3198b48b9238e3ad2fd9908d (diff)
NFS: Simplify ->decode_dirent() calling sequence
Clean up. The pointer returned by ->decode_dirent() is no longer used as a pointer. The only call site (xdr_decode() in fs/nfs/dir.c) simply extracts the errno value encoded in the pointer. Replace the returned pointer with a standard integer errno return value. Also, pass the "server" argument as part of the nfs_entry instead of as a separate parameter. It's faster to derive "server" in nfs_readdir_xdr_to_array() since we already have the directory's inode handy. "server" ought to be invariant for a set of entries in the same directory, right? The legacy versions of decode_dirent() don't use "server" anyway, so it's wasted work for them to derive and pass "server" for each entry. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/internal.h')
-rw-r--r--fs/nfs/internal.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 6c6a9955bae9..435eae3666bd 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -187,15 +187,18 @@ extern void nfs_destroy_directcache(void);
187/* nfs2xdr.c */ 187/* nfs2xdr.c */
188extern int nfs_stat_to_errno(enum nfs_stat); 188extern int nfs_stat_to_errno(enum nfs_stat);
189extern struct rpc_procinfo nfs_procedures[]; 189extern struct rpc_procinfo nfs_procedures[];
190extern __be32 *nfs2_decode_dirent(struct xdr_stream *, struct nfs_entry *, struct nfs_server *, int); 190extern int nfs2_decode_dirent(struct xdr_stream *,
191 struct nfs_entry *, int);
191 192
192/* nfs3xdr.c */ 193/* nfs3xdr.c */
193extern struct rpc_procinfo nfs3_procedures[]; 194extern struct rpc_procinfo nfs3_procedures[];
194extern __be32 *nfs3_decode_dirent(struct xdr_stream *, struct nfs_entry *, struct nfs_server *, int); 195extern int nfs3_decode_dirent(struct xdr_stream *,
196 struct nfs_entry *, int);
195 197
196/* nfs4xdr.c */ 198/* nfs4xdr.c */
197#ifdef CONFIG_NFS_V4 199#ifdef CONFIG_NFS_V4
198extern __be32 *nfs4_decode_dirent(struct xdr_stream *, struct nfs_entry *, struct nfs_server *, int); 200extern int nfs4_decode_dirent(struct xdr_stream *,
201 struct nfs_entry *, int);
199#endif 202#endif
200#ifdef CONFIG_NFS_V4_1 203#ifdef CONFIG_NFS_V4_1
201extern const u32 nfs41_maxread_overhead; 204extern const u32 nfs41_maxread_overhead;