diff options
author | Stanislav Kinsbursky <skinsbursky@parallels.com> | 2012-01-12 13:07:51 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-01-31 18:20:25 -0500 |
commit | 70abc49b4f4a4ef04a6bd9852edbd047b480bed7 (patch) | |
tree | 7c9a266ff8838d7945106920a5f0251861a850a5 /net/sunrpc/sunrpc_syms.c | |
parent | ccdc28f81c91f7ef2dc6c28d27f50264b19e4dd5 (diff) |
SUNRPC: make SUNPRC clients list per network namespace context
This patch moves static SUNRPC clients list and it's lock to sunrpc_net
structure.
Currently this list is used only for debug purposes. But later it will be used
also for selecting clients by networks namespace on PipeFS mount/umount events.
Per-network namespace lists will make this faster and simplier.
Note: client list is taken from "init_net" network namespace context in
rpc_show_tasks(). This will be changed some day later with making SUNRPC
sysctl's per network namespace context.
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/sunrpc_syms.c')
-rw-r--r-- | net/sunrpc/sunrpc_syms.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c index 7086d11589c8..b4217dc8599c 100644 --- a/net/sunrpc/sunrpc_syms.c +++ b/net/sunrpc/sunrpc_syms.c | |||
@@ -29,6 +29,7 @@ int sunrpc_net_id; | |||
29 | static __net_init int sunrpc_init_net(struct net *net) | 29 | static __net_init int sunrpc_init_net(struct net *net) |
30 | { | 30 | { |
31 | int err; | 31 | int err; |
32 | struct sunrpc_net *sn = net_generic(net, sunrpc_net_id); | ||
32 | 33 | ||
33 | err = rpc_proc_init(net); | 34 | err = rpc_proc_init(net); |
34 | if (err) | 35 | if (err) |
@@ -39,6 +40,8 @@ static __net_init int sunrpc_init_net(struct net *net) | |||
39 | goto err_ipmap; | 40 | goto err_ipmap; |
40 | 41 | ||
41 | rpc_pipefs_init_net(net); | 42 | rpc_pipefs_init_net(net); |
43 | INIT_LIST_HEAD(&sn->all_clients); | ||
44 | spin_lock_init(&sn->rpc_client_lock); | ||
42 | return 0; | 45 | return 0; |
43 | 46 | ||
44 | err_ipmap: | 47 | err_ipmap: |