Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[NETNS]: Do not include net/net_namespace.h from seq_file.h

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Denis V. Lunev and committed by
David S. Miller
c0f39322 856f6ff7

+29 -22
-22
include/linux/seq_file.h
··· 5 5 #include <linux/types.h> 6 6 #include <linux/string.h> 7 7 #include <linux/mutex.h> 8 - #include <net/net_namespace.h> 9 8 10 9 struct seq_operations; 11 10 struct file; ··· 61 62 loff_t pos); 62 63 extern struct list_head *seq_list_next(void *v, struct list_head *head, 63 64 loff_t *ppos); 64 - 65 - #ifdef CONFIG_NET 66 - struct net; 67 - struct seq_net_private { 68 - #ifdef CONFIG_NET_NS 69 - struct net *net; 70 - #endif 71 - }; 72 - 73 - int seq_open_net(struct inode *, struct file *, 74 - const struct seq_operations *, int); 75 - int seq_release_net(struct inode *, struct file *); 76 - static inline struct net *seq_file_net(struct seq_file *seq) 77 - { 78 - #ifdef CONFIG_NET_NS 79 - return ((struct seq_net_private *)seq->private)->net; 80 - #else 81 - return &init_net; 82 - #endif 83 - } 84 - #endif /* CONFIG_NET */ 85 65 86 66 #endif 87 67 #endif
+27
include/linux/seq_file_net.h
··· 1 + #ifndef __SEQ_FILE_NET_H__ 2 + #define __SEQ_FILE_NET_H__ 3 + 4 + #include <linux/seq_file.h> 5 + 6 + struct net; 7 + extern struct net init_net; 8 + 9 + struct seq_net_private { 10 + #ifdef CONFIG_NET_NS 11 + struct net *net; 12 + #endif 13 + }; 14 + 15 + int seq_open_net(struct inode *, struct file *, 16 + const struct seq_operations *, int); 17 + int seq_release_net(struct inode *, struct file *); 18 + static inline struct net *seq_file_net(struct seq_file *seq) 19 + { 20 + #ifdef CONFIG_NET_NS 21 + return ((struct seq_net_private *)seq->private)->net; 22 + #else 23 + return &init_net; 24 + #endif 25 + } 26 + 27 + #endif
+2
include/net/net_namespace.h
··· 61 61 62 62 63 63 #ifdef CONFIG_NET 64 + #include <linux/seq_file_net.h> 65 + 64 66 /* Init's network namespace */ 65 67 extern struct net init_net; 66 68 #define INIT_NET_NS(net_ns) .net_ns = &init_net,