diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-08-23 11:48:15 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-08-30 09:19:34 -0400 |
commit | 55909f21a1079c5f9751d7919f8c9411500e1667 (patch) | |
tree | 9d7dba57e6648975b9980df585c74b83a9981634 /net/sunrpc | |
parent | 2d9db75005effd6d4e0c8be4f74922e4f413fbe5 (diff) |
SUNRPC: Deprecate rpc_client->cl_protname
It just duplicates the cl_program->name, and is not used in any fast
paths where the extra dereference will cause a hit.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/clnt.c | 18 | ||||
-rw-r--r-- | net/sunrpc/rpc_pipe.c | 2 | ||||
-rw-r--r-- | net/sunrpc/stats.c | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 74f6a704e374..e862f8c7530a 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -629,7 +629,7 @@ void rpc_shutdown_client(struct rpc_clnt *clnt) | |||
629 | might_sleep(); | 629 | might_sleep(); |
630 | 630 | ||
631 | dprintk_rcu("RPC: shutting down %s client for %s\n", | 631 | dprintk_rcu("RPC: shutting down %s client for %s\n", |
632 | clnt->cl_protname, | 632 | clnt->cl_program->name, |
633 | rcu_dereference(clnt->cl_xprt)->servername); | 633 | rcu_dereference(clnt->cl_xprt)->servername); |
634 | 634 | ||
635 | while (!list_empty(&clnt->cl_tasks)) { | 635 | while (!list_empty(&clnt->cl_tasks)) { |
@@ -649,7 +649,7 @@ static void | |||
649 | rpc_free_client(struct rpc_clnt *clnt) | 649 | rpc_free_client(struct rpc_clnt *clnt) |
650 | { | 650 | { |
651 | dprintk_rcu("RPC: destroying %s client for %s\n", | 651 | dprintk_rcu("RPC: destroying %s client for %s\n", |
652 | clnt->cl_protname, | 652 | clnt->cl_program->name, |
653 | rcu_dereference(clnt->cl_xprt)->servername); | 653 | rcu_dereference(clnt->cl_xprt)->servername); |
654 | if (clnt->cl_parent != clnt) | 654 | if (clnt->cl_parent != clnt) |
655 | rpc_release_client(clnt->cl_parent); | 655 | rpc_release_client(clnt->cl_parent); |
@@ -1299,7 +1299,7 @@ call_start(struct rpc_task *task) | |||
1299 | struct rpc_clnt *clnt = task->tk_client; | 1299 | struct rpc_clnt *clnt = task->tk_client; |
1300 | 1300 | ||
1301 | dprintk("RPC: %5u call_start %s%d proc %s (%s)\n", task->tk_pid, | 1301 | dprintk("RPC: %5u call_start %s%d proc %s (%s)\n", task->tk_pid, |
1302 | clnt->cl_protname, clnt->cl_vers, | 1302 | clnt->cl_program->name, clnt->cl_vers, |
1303 | rpc_proc_name(task), | 1303 | rpc_proc_name(task), |
1304 | (RPC_IS_ASYNC(task) ? "async" : "sync")); | 1304 | (RPC_IS_ASYNC(task) ? "async" : "sync")); |
1305 | 1305 | ||
@@ -1908,7 +1908,7 @@ call_status(struct rpc_task *task) | |||
1908 | default: | 1908 | default: |
1909 | if (clnt->cl_chatty) | 1909 | if (clnt->cl_chatty) |
1910 | printk("%s: RPC call returned error %d\n", | 1910 | printk("%s: RPC call returned error %d\n", |
1911 | clnt->cl_protname, -status); | 1911 | clnt->cl_program->name, -status); |
1912 | rpc_exit(task, status); | 1912 | rpc_exit(task, status); |
1913 | } | 1913 | } |
1914 | } | 1914 | } |
@@ -1939,7 +1939,7 @@ call_timeout(struct rpc_task *task) | |||
1939 | if (clnt->cl_chatty) { | 1939 | if (clnt->cl_chatty) { |
1940 | rcu_read_lock(); | 1940 | rcu_read_lock(); |
1941 | printk(KERN_NOTICE "%s: server %s not responding, timed out\n", | 1941 | printk(KERN_NOTICE "%s: server %s not responding, timed out\n", |
1942 | clnt->cl_protname, | 1942 | clnt->cl_program->name, |
1943 | rcu_dereference(clnt->cl_xprt)->servername); | 1943 | rcu_dereference(clnt->cl_xprt)->servername); |
1944 | rcu_read_unlock(); | 1944 | rcu_read_unlock(); |
1945 | } | 1945 | } |
@@ -1955,7 +1955,7 @@ call_timeout(struct rpc_task *task) | |||
1955 | if (clnt->cl_chatty) { | 1955 | if (clnt->cl_chatty) { |
1956 | rcu_read_lock(); | 1956 | rcu_read_lock(); |
1957 | printk(KERN_NOTICE "%s: server %s not responding, still trying\n", | 1957 | printk(KERN_NOTICE "%s: server %s not responding, still trying\n", |
1958 | clnt->cl_protname, | 1958 | clnt->cl_program->name, |
1959 | rcu_dereference(clnt->cl_xprt)->servername); | 1959 | rcu_dereference(clnt->cl_xprt)->servername); |
1960 | rcu_read_unlock(); | 1960 | rcu_read_unlock(); |
1961 | } | 1961 | } |
@@ -1990,7 +1990,7 @@ call_decode(struct rpc_task *task) | |||
1990 | if (clnt->cl_chatty) { | 1990 | if (clnt->cl_chatty) { |
1991 | rcu_read_lock(); | 1991 | rcu_read_lock(); |
1992 | printk(KERN_NOTICE "%s: server %s OK\n", | 1992 | printk(KERN_NOTICE "%s: server %s OK\n", |
1993 | clnt->cl_protname, | 1993 | clnt->cl_program->name, |
1994 | rcu_dereference(clnt->cl_xprt)->servername); | 1994 | rcu_dereference(clnt->cl_xprt)->servername); |
1995 | rcu_read_unlock(); | 1995 | rcu_read_unlock(); |
1996 | } | 1996 | } |
@@ -2015,7 +2015,7 @@ call_decode(struct rpc_task *task) | |||
2015 | goto out_retry; | 2015 | goto out_retry; |
2016 | } | 2016 | } |
2017 | dprintk("RPC: %s: too small RPC reply size (%d bytes)\n", | 2017 | dprintk("RPC: %s: too small RPC reply size (%d bytes)\n", |
2018 | clnt->cl_protname, task->tk_status); | 2018 | clnt->cl_program->name, task->tk_status); |
2019 | task->tk_action = call_timeout; | 2019 | task->tk_action = call_timeout; |
2020 | goto out_retry; | 2020 | goto out_retry; |
2021 | } | 2021 | } |
@@ -2287,7 +2287,7 @@ static void rpc_show_task(const struct rpc_clnt *clnt, | |||
2287 | printk(KERN_INFO "%5u %04x %6d %8p %8p %8ld %8p %sv%u %s a:%ps q:%s\n", | 2287 | printk(KERN_INFO "%5u %04x %6d %8p %8p %8ld %8p %sv%u %s a:%ps q:%s\n", |
2288 | task->tk_pid, task->tk_flags, task->tk_status, | 2288 | task->tk_pid, task->tk_flags, task->tk_status, |
2289 | clnt, task->tk_rqstp, task->tk_timeout, task->tk_ops, | 2289 | clnt, task->tk_rqstp, task->tk_timeout, task->tk_ops, |
2290 | clnt->cl_protname, clnt->cl_vers, rpc_proc_name(task), | 2290 | clnt->cl_program->name, clnt->cl_vers, rpc_proc_name(task), |
2291 | task->tk_action, rpc_waitq); | 2291 | task->tk_action, rpc_waitq); |
2292 | } | 2292 | } |
2293 | 2293 | ||
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 017aedc8a7a1..b36bfb93924c 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c | |||
@@ -409,7 +409,7 @@ rpc_show_info(struct seq_file *m, void *v) | |||
409 | rcu_read_lock(); | 409 | rcu_read_lock(); |
410 | seq_printf(m, "RPC server: %s\n", | 410 | seq_printf(m, "RPC server: %s\n", |
411 | rcu_dereference(clnt->cl_xprt)->servername); | 411 | rcu_dereference(clnt->cl_xprt)->servername); |
412 | seq_printf(m, "service: %s (%d) version %d\n", clnt->cl_protname, | 412 | seq_printf(m, "service: %s (%d) version %d\n", clnt->cl_program->name, |
413 | clnt->cl_prog, clnt->cl_vers); | 413 | clnt->cl_prog, clnt->cl_vers); |
414 | seq_printf(m, "address: %s\n", rpc_peeraddr2str(clnt, RPC_DISPLAY_ADDR)); | 414 | seq_printf(m, "address: %s\n", rpc_peeraddr2str(clnt, RPC_DISPLAY_ADDR)); |
415 | seq_printf(m, "protocol: %s\n", rpc_peeraddr2str(clnt, RPC_DISPLAY_PROTO)); | 415 | seq_printf(m, "protocol: %s\n", rpc_peeraddr2str(clnt, RPC_DISPLAY_PROTO)); |
diff --git a/net/sunrpc/stats.c b/net/sunrpc/stats.c index 21b75cb08c03..54530490944e 100644 --- a/net/sunrpc/stats.c +++ b/net/sunrpc/stats.c | |||
@@ -188,7 +188,7 @@ void rpc_print_iostats(struct seq_file *seq, struct rpc_clnt *clnt) | |||
188 | 188 | ||
189 | seq_printf(seq, "\tRPC iostats version: %s ", RPC_IOSTATS_VERS); | 189 | seq_printf(seq, "\tRPC iostats version: %s ", RPC_IOSTATS_VERS); |
190 | seq_printf(seq, "p/v: %u/%u (%s)\n", | 190 | seq_printf(seq, "p/v: %u/%u (%s)\n", |
191 | clnt->cl_prog, clnt->cl_vers, clnt->cl_protname); | 191 | clnt->cl_prog, clnt->cl_vers, clnt->cl_program->name); |
192 | 192 | ||
193 | rcu_read_lock(); | 193 | rcu_read_lock(); |
194 | xprt = rcu_dereference(clnt->cl_xprt); | 194 | xprt = rcu_dereference(clnt->cl_xprt); |