Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90265
b: refs/heads/master
c: ffc31d3
h: refs/heads/master
i:
  90263: 1f85673
v: v3
  • Loading branch information
Denis V. Lunev authored and David S. Miller committed Mar 24, 2008
1 parent 71bf84f commit 9d929c3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 49e8a279a1b79e14b51aa6d4102b3a3de39e7a5e
refs/heads/master: ffc31d3d7719555cd784ecaf82e9c237f3a747ab
20 changes: 18 additions & 2 deletions trunk/net/ipv4/arp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1377,13 +1377,29 @@ static const struct file_operations arp_seq_fops = {
.release = seq_release_net,
};

static int __init arp_proc_init(void)

static int __net_init arp_net_init(struct net *net)
{
if (!proc_net_fops_create(&init_net, "arp", S_IRUGO, &arp_seq_fops))
if (!proc_net_fops_create(net, "arp", S_IRUGO, &arp_seq_fops))
return -ENOMEM;
return 0;
}

static void __net_exit arp_net_exit(struct net *net)
{
proc_net_remove(net, "arp");
}

static struct pernet_operations arp_net_ops = {
.init = arp_net_init,
.exit = arp_net_exit,
};

static int __init arp_proc_init(void)
{
return register_pernet_subsys(&arp_net_ops);
}

#else /* CONFIG_PROC_FS */

static int __init arp_proc_init(void)
Expand Down

0 comments on commit 9d929c3

Please sign in to comment.