]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
NFSv4: Simplify the NFSv4/v4.1 synchronous call switch
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 1 Nov 2012 18:43:38 +0000 (14:43 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 1 Nov 2012 21:52:56 +0000 (17:52 -0400)
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>
fs/nfs/internal.h
fs/nfs/nfs4_fs.h
fs/nfs/nfs4proc.c

index 05521cadac2e9821292c8c4eeefa037f5ef0a726..e1827b0bcce1ff9216a57c60d430cfeb2a6008b5 100644 (file)
@@ -474,18 +474,6 @@ extern struct nfs_client *nfs4_init_client(struct nfs_client *clp,
                            const struct rpc_timeout *timeparms,
                            const char *ip_addr,
                            rpc_authflavor_t authflavour);
-extern int _nfs4_call_sync(struct rpc_clnt *clnt,
-                          struct nfs_server *server,
-                          struct rpc_message *msg,
-                          struct nfs4_sequence_args *args,
-                          struct nfs4_sequence_res *res,
-                          int cache_reply);
-extern int _nfs4_call_sync_session(struct rpc_clnt *clnt,
-                                  struct nfs_server *server,
-                                  struct rpc_message *msg,
-                                  struct nfs4_sequence_args *args,
-                                  struct nfs4_sequence_res *res,
-                                  int cache_reply);
 extern int nfs40_walk_client_list(struct nfs_client *clp,
                                struct nfs_client **result,
                                struct rpc_cred *cred);
index 53112a1147c82e891baa8e2556134e8a11ae0bf8..01e58fd0b65d051a6e276a99486aa76d2f1afa4c 100644 (file)
@@ -43,8 +43,7 @@ struct nfs4_minor_version_ops {
                        struct nfs_server *server,
                        struct rpc_message *msg,
                        struct nfs4_sequence_args *args,
-                       struct nfs4_sequence_res *res,
-                       int cache_reply);
+                       struct nfs4_sequence_res *res);
        bool    (*match_stateid)(const nfs4_stateid *,
                        const nfs4_stateid *);
        int     (*find_root_sec)(struct nfs_server *, struct nfs_fh *,
index 365c4e68e2201903da528a479633bff2504ef4db..6b1f5d96b39a829609d2b785cc39939a2d112357 100644 (file)
@@ -752,14 +752,13 @@ static int nfs4_call_sync_sequence(struct rpc_clnt *clnt,
        return ret;
 }
 
+static
 int _nfs4_call_sync_session(struct rpc_clnt *clnt,
                            struct nfs_server *server,
                            struct rpc_message *msg,
                            struct nfs4_sequence_args *args,
-                           struct nfs4_sequence_res *res,
-                           int cache_reply)
+                           struct nfs4_sequence_res *res)
 {
-       nfs41_init_sequence(args, res, cache_reply);
        return nfs4_call_sync_sequence(clnt, server, msg, args, res, 0);
 }
 
@@ -777,18 +776,17 @@ static int nfs4_sequence_done(struct rpc_task *task,
 }
 #endif /* CONFIG_NFS_V4_1 */
 
+static
 int _nfs4_call_sync(struct rpc_clnt *clnt,
                    struct nfs_server *server,
                    struct rpc_message *msg,
                    struct nfs4_sequence_args *args,
-                   struct nfs4_sequence_res *res,
-                   int cache_reply)
+                   struct nfs4_sequence_res *res)
 {
-       nfs41_init_sequence(args, res, cache_reply);
        return rpc_call_sync(clnt, msg, 0);
 }
 
-static inline
+static
 int nfs4_call_sync(struct rpc_clnt *clnt,
                   struct nfs_server *server,
                   struct rpc_message *msg,
@@ -796,8 +794,9 @@ int nfs4_call_sync(struct rpc_clnt *clnt,
                   struct nfs4_sequence_res *res,
                   int cache_reply)
 {
+       nfs41_init_sequence(args, res, cache_reply);
        return server->nfs_client->cl_mvops->call_sync(clnt, server, msg,
-                                               args, res, cache_reply);
+                                               args, res);
 }
 
 static void update_changeattr(struct inode *dir, struct nfs4_change_info *cinfo)