Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 89800
b: refs/heads/master
c: 73b3871
h: refs/heads/master
v: v3
  • Loading branch information
Denis V. Lunev authored and David S. Miller committed Feb 29, 2008
1 parent 295d1b4 commit 521e268
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 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: a75e936f2f1ba8428f70b204f3ddd3a7ff17d281
refs/heads/master: 73b3871165e45ea6d57775c6bfb1a1760ad6e36b
24 changes: 21 additions & 3 deletions trunk/net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@ static int ip_rt_acct_read(char *buffer, char **start, off_t offset,
}
#endif

static __init int ip_rt_proc_init(struct net *net)
static int __net_init ip_rt_do_proc_init(struct net *net)
{
struct proc_dir_entry *pde;

Expand Down Expand Up @@ -576,8 +576,26 @@ static __init int ip_rt_proc_init(struct net *net)
err1:
return -ENOMEM;
}

static void __net_exit ip_rt_do_proc_exit(struct net *net)
{
remove_proc_entry("rt_cache", net->proc_net_stat);
remove_proc_entry("rt_cache", net->proc_net);
remove_proc_entry("rt_acct", net->proc_net);
}

static struct pernet_operations ip_rt_proc_ops __net_initdata = {
.init = ip_rt_do_proc_init,
.exit = ip_rt_do_proc_exit,
};

static int __init ip_rt_proc_init(void)
{
return register_pernet_subsys(&ip_rt_proc_ops);
}

#else
static inline int ip_rt_proc_init(struct net *net)
static inline int ip_rt_proc_init(void)
{
return 0;
}
Expand Down Expand Up @@ -3055,7 +3073,7 @@ int __init ip_rt_init(void)
ip_rt_secret_interval;
add_timer(&rt_secret_timer);

if (ip_rt_proc_init(&init_net))
if (ip_rt_proc_init())
printk(KERN_ERR "Unable to create route proc files\n");
#ifdef CONFIG_XFRM
xfrm_init();
Expand Down

0 comments on commit 521e268

Please sign in to comment.