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

net: move seq_file_single_net to <linux/seq_file_net.h>

This helper deals with single_{open,release}_net internals and thus
belongs here.

Signed-off-by: Christoph Hellwig <hch@lst.de>

+13 -12
+13
include/linux/seq_file_net.h
··· 28 28 #endif 29 29 } 30 30 31 + /* 32 + * This one is needed for single_open_net since net is stored directly in 33 + * private not as a struct i.e. seq_file_net can't be used. 34 + */ 35 + static inline struct net *seq_file_single_net(struct seq_file *seq) 36 + { 37 + #ifdef CONFIG_NET_NS 38 + return (struct net *)seq->private; 39 + #else 40 + return &init_net; 41 + #endif 42 + } 43 + 31 44 #endif
-12
include/net/ip_vs.h
··· 41 41 return net->ipvs; 42 42 } 43 43 44 - /* This one needed for single_open_net since net is stored directly in 45 - * private not as a struct i.e. seq_file_net can't be used. 46 - */ 47 - static inline struct net *seq_file_single_net(struct seq_file *seq) 48 - { 49 - #ifdef CONFIG_NET_NS 50 - return (struct net *)seq->private; 51 - #else 52 - return &init_net; 53 - #endif 54 - } 55 - 56 44 /* Connections' size value needed by ip_vs_ctl.c */ 57 45 extern int ip_vs_conn_tab_size; 58 46