summaryrefslogtreecommitdiffstats
path: root/net/sctp/objcnt.c
diff options
context:
space:
mode:
authorEric W. Biederman2012-08-06 10:45:15 +0200
committerDavid S. Miller2012-08-15 08:29:53 +0200
commit13d782f6b4fbbaf9d0380a9947deb45a9de46ae7 (patch)
treea9b17830724d4470af1a37abec88902bd1a09aca /net/sctp/objcnt.c
parentsctp: Move the percpu sockets counter out of sctp_proc_init (diff)
downloadkernel-qcow2-linux-13d782f6b4fbbaf9d0380a9947deb45a9de46ae7.tar.gz
kernel-qcow2-linux-13d782f6b4fbbaf9d0380a9947deb45a9de46ae7.tar.xz
kernel-qcow2-linux-13d782f6b4fbbaf9d0380a9947deb45a9de46ae7.zip
sctp: Make the proc files per network namespace.
- Convert all of the files under /proc/net/sctp to be per network namespace. - Don't print anything for /proc/net/sctp/snmp except in the initial network namespaces as the snmp counters still have to be converted to be per network namespace. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: Vlad Yasevich <vyasevich@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/objcnt.c')
-rw-r--r--net/sctp/objcnt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/sctp/objcnt.c b/net/sctp/objcnt.c
index 8ef8e7d9eb61..fe012c44f8df 100644
--- a/net/sctp/objcnt.c
+++ b/net/sctp/objcnt.c
@@ -129,20 +129,20 @@ static const struct file_operations sctp_objcnt_ops = {
};
/* Initialize the objcount in the proc filesystem. */
-void sctp_dbg_objcnt_init(void)
+void sctp_dbg_objcnt_init(struct net *net)
{
struct proc_dir_entry *ent;
ent = proc_create("sctp_dbg_objcnt", 0,
- proc_net_sctp, &sctp_objcnt_ops);
+ net->sctp.proc_net_sctp, &sctp_objcnt_ops);
if (!ent)
pr_warn("sctp_dbg_objcnt: Unable to create /proc entry.\n");
}
/* Cleanup the objcount entry in the proc filesystem. */
-void sctp_dbg_objcnt_exit(void)
+void sctp_dbg_objcnt_exit(struct net *net)
{
- remove_proc_entry("sctp_dbg_objcnt", proc_net_sctp);
+ remove_proc_entry("sctp_dbg_objcnt", net->sctp.proc_net_sctp);
}