aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/udp.c12
-rw-r--r--net/ipv4/udplite.c2
2 files changed, 7 insertions, 7 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 049e92519616..a98c43c0a89c 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1632,7 +1632,7 @@ static int udp_seq_release(struct inode *inode, struct file *file)
1632} 1632}
1633 1633
1634/* ------------------------------------------------------------------------ */ 1634/* ------------------------------------------------------------------------ */
1635int udp_proc_register(struct udp_seq_afinfo *afinfo) 1635int udp_proc_register(struct net *net, struct udp_seq_afinfo *afinfo)
1636{ 1636{
1637 struct proc_dir_entry *p; 1637 struct proc_dir_entry *p;
1638 int rc = 0; 1638 int rc = 0;
@@ -1645,7 +1645,7 @@ int udp_proc_register(struct udp_seq_afinfo *afinfo)
1645 afinfo->seq_fops->llseek = seq_lseek; 1645 afinfo->seq_fops->llseek = seq_lseek;
1646 afinfo->seq_fops->release = udp_seq_release; 1646 afinfo->seq_fops->release = udp_seq_release;
1647 1647
1648 p = proc_net_fops_create(&init_net, afinfo->name, S_IRUGO, afinfo->seq_fops); 1648 p = proc_net_fops_create(net, afinfo->name, S_IRUGO, afinfo->seq_fops);
1649 if (p) 1649 if (p)
1650 p->data = afinfo; 1650 p->data = afinfo;
1651 else 1651 else
@@ -1653,11 +1653,11 @@ int udp_proc_register(struct udp_seq_afinfo *afinfo)
1653 return rc; 1653 return rc;
1654} 1654}
1655 1655
1656void udp_proc_unregister(struct udp_seq_afinfo *afinfo) 1656void udp_proc_unregister(struct net *net, struct udp_seq_afinfo *afinfo)
1657{ 1657{
1658 if (!afinfo) 1658 if (!afinfo)
1659 return; 1659 return;
1660 proc_net_remove(&init_net, afinfo->name); 1660 proc_net_remove(net, afinfo->name);
1661 memset(afinfo->seq_fops, 0, sizeof(*afinfo->seq_fops)); 1661 memset(afinfo->seq_fops, 0, sizeof(*afinfo->seq_fops));
1662} 1662}
1663 1663
@@ -1709,12 +1709,12 @@ static struct udp_seq_afinfo udp4_seq_afinfo = {
1709 1709
1710int __init udp4_proc_init(void) 1710int __init udp4_proc_init(void)
1711{ 1711{
1712 return udp_proc_register(&udp4_seq_afinfo); 1712 return udp_proc_register(&init_net, &udp4_seq_afinfo);
1713} 1713}
1714 1714
1715void udp4_proc_exit(void) 1715void udp4_proc_exit(void)
1716{ 1716{
1717 udp_proc_unregister(&udp4_seq_afinfo); 1717 udp_proc_unregister(&init_net, &udp4_seq_afinfo);
1718} 1718}
1719#endif /* CONFIG_PROC_FS */ 1719#endif /* CONFIG_PROC_FS */
1720 1720
diff --git a/net/ipv4/udplite.c b/net/ipv4/udplite.c
index d49c6d68c8a9..2469b5104587 100644
--- a/net/ipv4/udplite.c
+++ b/net/ipv4/udplite.c
@@ -105,7 +105,7 @@ void __init udplite4_register(void)
105 inet_register_protosw(&udplite4_protosw); 105 inet_register_protosw(&udplite4_protosw);
106 106
107#ifdef CONFIG_PROC_FS 107#ifdef CONFIG_PROC_FS
108 if (udp_proc_register(&udplite4_seq_afinfo)) /* udplite4_proc_init() */ 108 if (udp_proc_register(&init_net, &udplite4_seq_afinfo))
109 printk(KERN_ERR "%s: Cannot register /proc!\n", __func__); 109 printk(KERN_ERR "%s: Cannot register /proc!\n", __func__);
110#endif 110#endif
111 return; 111 return;