]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net: move seq_file_single_net to <linux/seq_file_net.h>
authorChristoph Hellwig <hch@lst.de>
Wed, 11 Apr 2018 10:32:45 +0000 (12:32 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 16 May 2018 05:24:30 +0000 (07:24 +0200)
This helper deals with single_{open,release}_net internals and thus
belongs here.

Signed-off-by: Christoph Hellwig <hch@lst.de>
include/linux/seq_file_net.h
include/net/ip_vs.h

index 43ccd84127b6799c099d280612d20d001e63113f..ed20faa99e056045a7729342dcc20ca158b2cc2f 100644 (file)
@@ -28,4 +28,17 @@ static inline struct net *seq_file_net(struct seq_file *seq)
 #endif
 }
 
+/*
+ * This one is needed for single_open_net since net is stored directly in
+ * private not as a struct i.e. seq_file_net can't be used.
+ */
+static inline struct net *seq_file_single_net(struct seq_file *seq)
+{
+#ifdef CONFIG_NET_NS
+       return (struct net *)seq->private;
+#else
+       return &init_net;
+#endif
+}
+
 #endif
index eb0bec043c9618b6f44a5bcb3d2138056672c851..aea7a124e66b095c06d790f8c9f408dbb155dd67 100644 (file)
@@ -41,18 +41,6 @@ static inline struct netns_ipvs *net_ipvs(struct net* net)
        return net->ipvs;
 }
 
-/* This one needed for single_open_net since net is stored directly in
- * private not as a struct i.e. seq_file_net can't be used.
- */
-static inline struct net *seq_file_single_net(struct seq_file *seq)
-{
-#ifdef CONFIG_NET_NS
-       return (struct net *)seq->private;
-#else
-       return &init_net;
-#endif
-}
-
 /* Connections' size value needed by ip_vs_ctl.c */
 extern int ip_vs_conn_tab_size;