aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-11-01 14:43:38 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-12-05 18:30:49 -0500
commitfd0c09537a8494e9dccf3856b90058e1f97f1d62 (patch)
tree57b9e47a0669dc3e8871504b189b913e1ffcc809 /fs/nfs
parentd9afbd1b0889e7da6742e9c67ccc7becc4161f65 (diff)
NFSv4: Simplify the NFSv4/v4.1 synchronous call switch
We shouldn't need to pass the 'cache_reply' parameter if we initialise the sequence_args/sequence_res in the caller. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/internal.h12
-rw-r--r--fs/nfs/nfs4_fs.h3
-rw-r--r--fs/nfs/nfs4proc.c15
3 files changed, 8 insertions, 22 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 9bdbfc3884a9..fb994471bd32 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -451,18 +451,6 @@ extern struct nfs_client *nfs4_init_client(struct nfs_client *clp,
451 const struct rpc_timeout *timeparms, 451 const struct rpc_timeout *timeparms,
452 const char *ip_addr, 452 const char *ip_addr,
453 rpc_authflavor_t authflavour); 453 rpc_authflavor_t authflavour);
454extern int _nfs4_call_sync(struct rpc_clnt *clnt,
455 struct nfs_server *server,
456 struct rpc_message *msg,
457 struct nfs4_sequence_args *args,
458 struct nfs4_sequence_res *res,
459 int cache_reply);
460extern int _nfs4_call_sync_session(struct rpc_clnt *clnt,
461 struct nfs_server *server,
462 struct rpc_message *msg,
463 struct nfs4_sequence_args *args,
464 struct nfs4_sequence_res *res,
465 int cache_reply);
466extern int nfs40_walk_client_list(struct nfs_client *clp, 454extern int nfs40_walk_client_list(struct nfs_client *clp,
467 struct nfs_client **result, 455 struct nfs_client **result,
468 struct rpc_cred *cred); 456 struct rpc_cred *cred);
diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index 8022adec34cd..4f0cdc1b7148 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -39,8 +39,7 @@ struct nfs4_minor_version_ops {
39 struct nfs_server *server, 39 struct nfs_server *server,
40 struct rpc_message *msg, 40 struct rpc_message *msg,
41 struct nfs4_sequence_args *args, 41 struct nfs4_sequence_args *args,
42 struct nfs4_sequence_res *res, 42 struct nfs4_sequence_res *res);
43 int cache_reply);
44 bool (*match_stateid)(const nfs4_stateid *, 43 bool (*match_stateid)(const nfs4_stateid *,
45 const nfs4_stateid *); 44 const nfs4_stateid *);
46 int (*find_root_sec)(struct nfs_server *, struct nfs_fh *, 45 int (*find_root_sec)(struct nfs_server *, struct nfs_fh *,
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 23b0c2fcb052..4aaaa3ba3088 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -664,14 +664,13 @@ static int nfs4_call_sync_sequence(struct rpc_clnt *clnt,
664 return ret; 664 return ret;
665} 665}
666 666
667static
667int _nfs4_call_sync_session(struct rpc_clnt *clnt, 668int _nfs4_call_sync_session(struct rpc_clnt *clnt,
668 struct nfs_server *server, 669 struct nfs_server *server,
669 struct rpc_message *msg, 670 struct rpc_message *msg,
670 struct nfs4_sequence_args *args, 671 struct nfs4_sequence_args *args,
671 struct nfs4_sequence_res *res, 672 struct nfs4_sequence_res *res)
672 int cache_reply)
673{ 673{
674 nfs41_init_sequence(args, res, cache_reply);
675 return nfs4_call_sync_sequence(clnt, server, msg, args, res, 0); 674 return nfs4_call_sync_sequence(clnt, server, msg, args, res, 0);
676} 675}
677 676
@@ -689,18 +688,17 @@ static int nfs4_sequence_done(struct rpc_task *task,
689} 688}
690#endif /* CONFIG_NFS_V4_1 */ 689#endif /* CONFIG_NFS_V4_1 */
691 690
691static
692int _nfs4_call_sync(struct rpc_clnt *clnt, 692int _nfs4_call_sync(struct rpc_clnt *clnt,
693 struct nfs_server *server, 693 struct nfs_server *server,
694 struct rpc_message *msg, 694 struct rpc_message *msg,
695 struct nfs4_sequence_args *args, 695 struct nfs4_sequence_args *args,
696 struct nfs4_sequence_res *res, 696 struct nfs4_sequence_res *res)
697 int cache_reply)
698{ 697{
699 nfs41_init_sequence(args, res, cache_reply);
700 return rpc_call_sync(clnt, msg, 0); 698 return rpc_call_sync(clnt, msg, 0);
701} 699}
702 700
703static inline 701static
704int nfs4_call_sync(struct rpc_clnt *clnt, 702int nfs4_call_sync(struct rpc_clnt *clnt,
705 struct nfs_server *server, 703 struct nfs_server *server,
706 struct rpc_message *msg, 704 struct rpc_message *msg,
@@ -708,8 +706,9 @@ int nfs4_call_sync(struct rpc_clnt *clnt,
708 struct nfs4_sequence_res *res, 706 struct nfs4_sequence_res *res,
709 int cache_reply) 707 int cache_reply)
710{ 708{
709 nfs41_init_sequence(args, res, cache_reply);
711 return server->nfs_client->cl_mvops->call_sync(clnt, server, msg, 710 return server->nfs_client->cl_mvops->call_sync(clnt, server, msg,
712 args, res, cache_reply); 711 args, res);
713} 712}
714 713
715static void update_changeattr(struct inode *dir, struct nfs4_change_info *cinfo) 714static void update_changeattr(struct inode *dir, struct nfs4_change_info *cinfo)