diff options
Diffstat (limited to 'net/ipv4/fib_trie.c')
-rw-r--r-- | net/ipv4/fib_trie.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c index 52b2891c63b7..be34bd556d58 100644 --- a/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c | |||
@@ -73,6 +73,7 @@ | |||
73 | #include <linux/netlink.h> | 73 | #include <linux/netlink.h> |
74 | #include <linux/init.h> | 74 | #include <linux/init.h> |
75 | #include <linux/list.h> | 75 | #include <linux/list.h> |
76 | #include <net/net_namespace.h> | ||
76 | #include <net/ip.h> | 77 | #include <net/ip.h> |
77 | #include <net/protocol.h> | 78 | #include <net/protocol.h> |
78 | #include <net/route.h> | 79 | #include <net/route.h> |
@@ -2530,30 +2531,30 @@ static const struct file_operations fib_route_fops = { | |||
2530 | 2531 | ||
2531 | int __init fib_proc_init(void) | 2532 | int __init fib_proc_init(void) |
2532 | { | 2533 | { |
2533 | if (!proc_net_fops_create("fib_trie", S_IRUGO, &fib_trie_fops)) | 2534 | if (!proc_net_fops_create(&init_net, "fib_trie", S_IRUGO, &fib_trie_fops)) |
2534 | goto out1; | 2535 | goto out1; |
2535 | 2536 | ||
2536 | if (!proc_net_fops_create("fib_triestat", S_IRUGO, &fib_triestat_fops)) | 2537 | if (!proc_net_fops_create(&init_net, "fib_triestat", S_IRUGO, &fib_triestat_fops)) |
2537 | goto out2; | 2538 | goto out2; |
2538 | 2539 | ||
2539 | if (!proc_net_fops_create("route", S_IRUGO, &fib_route_fops)) | 2540 | if (!proc_net_fops_create(&init_net, "route", S_IRUGO, &fib_route_fops)) |
2540 | goto out3; | 2541 | goto out3; |
2541 | 2542 | ||
2542 | return 0; | 2543 | return 0; |
2543 | 2544 | ||
2544 | out3: | 2545 | out3: |
2545 | proc_net_remove("fib_triestat"); | 2546 | proc_net_remove(&init_net, "fib_triestat"); |
2546 | out2: | 2547 | out2: |
2547 | proc_net_remove("fib_trie"); | 2548 | proc_net_remove(&init_net, "fib_trie"); |
2548 | out1: | 2549 | out1: |
2549 | return -ENOMEM; | 2550 | return -ENOMEM; |
2550 | } | 2551 | } |
2551 | 2552 | ||
2552 | void __init fib_proc_exit(void) | 2553 | void __init fib_proc_exit(void) |
2553 | { | 2554 | { |
2554 | proc_net_remove("fib_trie"); | 2555 | proc_net_remove(&init_net, "fib_trie"); |
2555 | proc_net_remove("fib_triestat"); | 2556 | proc_net_remove(&init_net, "fib_triestat"); |
2556 | proc_net_remove("route"); | 2557 | proc_net_remove(&init_net, "route"); |
2557 | } | 2558 | } |
2558 | 2559 | ||
2559 | #endif /* CONFIG_PROC_FS */ | 2560 | #endif /* CONFIG_PROC_FS */ |