Commit fd0c0953 authored by Trond Myklebust's avatar Trond Myklebust

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: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent d9afbd1b
...@@ -451,18 +451,6 @@ extern struct nfs_client *nfs4_init_client(struct nfs_client *clp, ...@@ -451,18 +451,6 @@ extern struct nfs_client *nfs4_init_client(struct nfs_client *clp,
const struct rpc_timeout *timeparms, const struct rpc_timeout *timeparms,
const char *ip_addr, const char *ip_addr,
rpc_authflavor_t authflavour); 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, extern int nfs40_walk_client_list(struct nfs_client *clp,
struct nfs_client **result, struct nfs_client **result,
struct rpc_cred *cred); struct rpc_cred *cred);
......
...@@ -39,8 +39,7 @@ struct nfs4_minor_version_ops { ...@@ -39,8 +39,7 @@ struct nfs4_minor_version_ops {
struct nfs_server *server, struct nfs_server *server,
struct rpc_message *msg, struct rpc_message *msg,
struct nfs4_sequence_args *args, struct nfs4_sequence_args *args,
struct nfs4_sequence_res *res, struct nfs4_sequence_res *res);
int cache_reply);
bool (*match_stateid)(const nfs4_stateid *, bool (*match_stateid)(const nfs4_stateid *,
const nfs4_stateid *); const nfs4_stateid *);
int (*find_root_sec)(struct nfs_server *, struct nfs_fh *, int (*find_root_sec)(struct nfs_server *, struct nfs_fh *,
......
...@@ -664,14 +664,13 @@ static int nfs4_call_sync_sequence(struct rpc_clnt *clnt, ...@@ -664,14 +664,13 @@ static int nfs4_call_sync_sequence(struct rpc_clnt *clnt,
return ret; return ret;
} }
static
int _nfs4_call_sync_session(struct rpc_clnt *clnt, int _nfs4_call_sync_session(struct rpc_clnt *clnt,
struct nfs_server *server, struct nfs_server *server,
struct rpc_message *msg, struct rpc_message *msg,
struct nfs4_sequence_args *args, struct nfs4_sequence_args *args,
struct nfs4_sequence_res *res, struct nfs4_sequence_res *res)
int cache_reply)
{ {
nfs41_init_sequence(args, res, cache_reply);
return nfs4_call_sync_sequence(clnt, server, msg, args, res, 0); return nfs4_call_sync_sequence(clnt, server, msg, args, res, 0);
} }
...@@ -689,18 +688,17 @@ static int nfs4_sequence_done(struct rpc_task *task, ...@@ -689,18 +688,17 @@ static int nfs4_sequence_done(struct rpc_task *task,
} }
#endif /* CONFIG_NFS_V4_1 */ #endif /* CONFIG_NFS_V4_1 */
static
int _nfs4_call_sync(struct rpc_clnt *clnt, int _nfs4_call_sync(struct rpc_clnt *clnt,
struct nfs_server *server, struct nfs_server *server,
struct rpc_message *msg, struct rpc_message *msg,
struct nfs4_sequence_args *args, struct nfs4_sequence_args *args,
struct nfs4_sequence_res *res, struct nfs4_sequence_res *res)
int cache_reply)
{ {
nfs41_init_sequence(args, res, cache_reply);
return rpc_call_sync(clnt, msg, 0); return rpc_call_sync(clnt, msg, 0);
} }
static inline static
int nfs4_call_sync(struct rpc_clnt *clnt, int nfs4_call_sync(struct rpc_clnt *clnt,
struct nfs_server *server, struct nfs_server *server,
struct rpc_message *msg, struct rpc_message *msg,
...@@ -708,8 +706,9 @@ int nfs4_call_sync(struct rpc_clnt *clnt, ...@@ -708,8 +706,9 @@ int nfs4_call_sync(struct rpc_clnt *clnt,
struct nfs4_sequence_res *res, struct nfs4_sequence_res *res,
int cache_reply) int cache_reply)
{ {
nfs41_init_sequence(args, res, cache_reply);
return server->nfs_client->cl_mvops->call_sync(clnt, server, msg, 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) static void update_changeattr(struct inode *dir, struct nfs4_change_info *cinfo)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment