aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
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 /include/linux
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 'include/linux')
-rw-r--r--include/linux/nfs_xdr.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 80f07198a31a..236e7e4b99a0 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -484,6 +484,7 @@ struct nfs_entry {
484 struct nfs_fh * fh; 484 struct nfs_fh * fh;
485 struct nfs_fattr * fattr; 485 struct nfs_fattr * fattr;
486 unsigned char d_type; 486 unsigned char d_type;
487 struct nfs_server * server;
487}; 488};
488 489
489/* 490/*
@@ -1089,7 +1090,7 @@ struct nfs_rpc_ops {
1089 int (*pathconf) (struct nfs_server *, struct nfs_fh *, 1090 int (*pathconf) (struct nfs_server *, struct nfs_fh *,
1090 struct nfs_pathconf *); 1091 struct nfs_pathconf *);
1091 int (*set_capabilities)(struct nfs_server *, struct nfs_fh *); 1092 int (*set_capabilities)(struct nfs_server *, struct nfs_fh *);
1092 __be32 *(*decode_dirent)(struct xdr_stream *, struct nfs_entry *, struct nfs_server *, int plus); 1093 int (*decode_dirent)(struct xdr_stream *, struct nfs_entry *, int);
1093 void (*read_setup) (struct nfs_read_data *, struct rpc_message *); 1094 void (*read_setup) (struct nfs_read_data *, struct rpc_message *);
1094 int (*read_done) (struct rpc_task *, struct nfs_read_data *); 1095 int (*read_done) (struct rpc_task *, struct nfs_read_data *);
1095 void (*write_setup) (struct nfs_write_data *, struct rpc_message *); 1096 void (*write_setup) (struct nfs_write_data *, struct rpc_message *);