aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/seq_file.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/seq_file.h')
-rw-r--r--include/linux/seq_file.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h
index 67c2563961f3..d870a8253769 100644
--- a/include/linux/seq_file.h
+++ b/include/linux/seq_file.h
@@ -5,6 +5,7 @@
5#include <linux/types.h> 5#include <linux/types.h>
6#include <linux/string.h> 6#include <linux/string.h>
7#include <linux/mutex.h> 7#include <linux/mutex.h>
8#include <net/net_namespace.h>
8 9
9struct seq_operations; 10struct seq_operations;
10struct file; 11struct file;
@@ -64,7 +65,9 @@ extern struct list_head *seq_list_next(void *v, struct list_head *head,
64 65
65struct net; 66struct net;
66struct seq_net_private { 67struct seq_net_private {
68#ifdef CONFIG_NET_NS
67 struct net *net; 69 struct net *net;
70#endif
68}; 71};
69 72
70int seq_open_net(struct inode *, struct file *, 73int seq_open_net(struct inode *, struct file *,
@@ -72,7 +75,11 @@ int seq_open_net(struct inode *, struct file *,
72int seq_release_net(struct inode *, struct file *); 75int seq_release_net(struct inode *, struct file *);
73static inline struct net *seq_file_net(struct seq_file *seq) 76static inline struct net *seq_file_net(struct seq_file *seq)
74{ 77{
78#ifdef CONFIG_NET_NS
75 return ((struct seq_net_private *)seq->private)->net; 79 return ((struct seq_net_private *)seq->private)->net;
80#else
81 return &init_net;
82#endif
76} 83}
77 84
78#endif 85#endif