* [2.6 patch] make get_proc_net() static
@ 2008-07-22 17:20 Adrian Bunk
2008-07-22 19:13 ` Pavel Emelyanov
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2008-07-22 17:20 UTC (permalink / raw)
To: Pavel Emelyanov, David S. Miller; +Cc: netdev
get_proc_net() can now become static.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
fs/proc/proc_net.c | 11 +++++------
include/linux/proc_fs.h | 2 --
2 files changed, 5 insertions(+), 8 deletions(-)
48b48347bed28ecad3c612d2fdffbde73dc98584
diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c
index b224a28..7bc296f 100644
--- a/fs/proc/proc_net.c
+++ b/fs/proc/proc_net.c
@@ -27,6 +27,11 @@
#include "internal.h"
+static struct net *get_proc_net(const struct inode *inode)
+{
+ return maybe_get_net(PDE_NET(PDE(inode)));
+}
+
int seq_open_net(struct inode *ino, struct file *f,
const struct seq_operations *ops, int size)
{
@@ -185,12 +190,6 @@ void proc_net_remove(struct net *net, const char *name)
}
EXPORT_SYMBOL_GPL(proc_net_remove);
-struct net *get_proc_net(const struct inode *inode)
-{
- return maybe_get_net(PDE_NET(PDE(inode)));
-}
-EXPORT_SYMBOL_GPL(get_proc_net);
-
static __net_init int proc_net_ns_init(struct net *net)
{
struct proc_dir_entry *netd, *net_statd;
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index fff1d27..15a9eaf 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -305,8 +305,6 @@ static inline struct net *PDE_NET(struct proc_dir_entry *pde)
return pde->parent->data;
}
-struct net *get_proc_net(const struct inode *inode);
-
struct proc_maps_private {
struct pid *pid;
struct task_struct *task;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [2.6 patch] make get_proc_net() static
2008-07-22 17:20 [2.6 patch] make get_proc_net() static Adrian Bunk
@ 2008-07-22 19:13 ` Pavel Emelyanov
2008-07-22 21:19 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Emelyanov @ 2008-07-22 19:13 UTC (permalink / raw)
To: Adrian Bunk; +Cc: David S. Miller, netdev
Adrian Bunk wrote:
> get_proc_net() can now become static.
>
> Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Pavel Emelyanov <xemul@openvz.org>
Although there are some files in net/ that do not yet use
the seq_file interface and thus may require this function
when netnsizated, hiding this one will force us clean these
files first by switching to use seq_files :)
> ---
>
> fs/proc/proc_net.c | 11 +++++------
> include/linux/proc_fs.h | 2 --
> 2 files changed, 5 insertions(+), 8 deletions(-)
>
> 48b48347bed28ecad3c612d2fdffbde73dc98584
> diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c
> index b224a28..7bc296f 100644
> --- a/fs/proc/proc_net.c
> +++ b/fs/proc/proc_net.c
> @@ -27,6 +27,11 @@
> #include "internal.h"
>
>
> +static struct net *get_proc_net(const struct inode *inode)
> +{
> + return maybe_get_net(PDE_NET(PDE(inode)));
> +}
> +
> int seq_open_net(struct inode *ino, struct file *f,
> const struct seq_operations *ops, int size)
> {
> @@ -185,12 +190,6 @@ void proc_net_remove(struct net *net, const char *name)
> }
> EXPORT_SYMBOL_GPL(proc_net_remove);
>
> -struct net *get_proc_net(const struct inode *inode)
> -{
> - return maybe_get_net(PDE_NET(PDE(inode)));
> -}
> -EXPORT_SYMBOL_GPL(get_proc_net);
> -
> static __net_init int proc_net_ns_init(struct net *net)
> {
> struct proc_dir_entry *netd, *net_statd;
> diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
> index fff1d27..15a9eaf 100644
> --- a/include/linux/proc_fs.h
> +++ b/include/linux/proc_fs.h
> @@ -305,8 +305,6 @@ static inline struct net *PDE_NET(struct proc_dir_entry *pde)
> return pde->parent->data;
> }
>
> -struct net *get_proc_net(const struct inode *inode);
> -
> struct proc_maps_private {
> struct pid *pid;
> struct task_struct *task;
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [2.6 patch] make get_proc_net() static
2008-07-22 19:13 ` Pavel Emelyanov
@ 2008-07-22 21:19 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2008-07-22 21:19 UTC (permalink / raw)
To: xemul; +Cc: bunk, netdev
From: Pavel Emelyanov <xemul@openvz.org>
Date: Tue, 22 Jul 2008 23:13:00 +0400
> Adrian Bunk wrote:
> > get_proc_net() can now become static.
> >
> > Signed-off-by: Adrian Bunk <bunk@kernel.org>
>
> Acked-by: Pavel Emelyanov <xemul@openvz.org>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-07-22 21:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-22 17:20 [2.6 patch] make get_proc_net() static Adrian Bunk
2008-07-22 19:13 ` Pavel Emelyanov
2008-07-22 21:19 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).