aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd
diff options
context:
space:
mode:
authorChuck Lever <cel@netapp.com>2006-03-20 13:44:23 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-03-20 13:44:23 -0500
commitdead28da8e3fb32601d38fb32b7021122e0a3d21 (patch)
treea1a23e27e08345c86ed0d9812f848470b615eb34 /fs/lockd
parentcc0175c1dc1de8f6af0eb0631dcc5b999a6fcc42 (diff)
SUNRPC: eliminate rpc_call()
Clean-up: replace rpc_call() helper with direct call to rpc_call_sync. This makes NFSv2 and NFSv3 synchronous calls more computationally efficient, and reduces stack consumption in functions that used to invoke rpc_call more than once. Test plan: Compile kernel with CONFIG_NFS enabled. Connectathon on NFS version 2, version 3, and version 4 mount points. Signed-off-by: Chuck Lever <cel@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/lockd')
-rw-r--r--fs/lockd/mon.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c
index 84ee39e6a3a2..5dd52b70859a 100644
--- a/fs/lockd/mon.c
+++ b/fs/lockd/mon.c
@@ -35,6 +35,10 @@ nsm_mon_unmon(struct nlm_host *host, u32 proc, struct nsm_res *res)
35 struct rpc_clnt *clnt; 35 struct rpc_clnt *clnt;
36 int status; 36 int status;
37 struct nsm_args args; 37 struct nsm_args args;
38 struct rpc_message msg = {
39 .rpc_argp = &args,
40 .rpc_resp = res,
41 };
38 42
39 clnt = nsm_create(); 43 clnt = nsm_create();
40 if (IS_ERR(clnt)) { 44 if (IS_ERR(clnt)) {
@@ -49,7 +53,8 @@ nsm_mon_unmon(struct nlm_host *host, u32 proc, struct nsm_res *res)
49 args.proc = NLMPROC_NSM_NOTIFY; 53 args.proc = NLMPROC_NSM_NOTIFY;
50 memset(res, 0, sizeof(*res)); 54 memset(res, 0, sizeof(*res));
51 55
52 status = rpc_call(clnt, proc, &args, res, 0); 56 msg.rpc_proc = &clnt->cl_procinfo[proc];
57 status = rpc_call_sync(clnt, &msg, 0);
53 if (status < 0) 58 if (status < 0)
54 printk(KERN_DEBUG "nsm_mon_unmon: rpc failed, status=%d\n", 59 printk(KERN_DEBUG "nsm_mon_unmon: rpc failed, status=%d\n",
55 status); 60 status);