netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Emelyanov <xemul@openvz.org>
To: Adrian Bunk <bunk@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [2.6 patch] make get_proc_net() static
Date: Tue, 22 Jul 2008 23:13:00 +0400	[thread overview]
Message-ID: <4886313C.3000200@openvz.org> (raw)
In-Reply-To: <20080722172033.GQ14846@cs181140183.pp.htv.fi>

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;
> 
> 


  reply	other threads:[~2008-07-22 19:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-22 17:20 [2.6 patch] make get_proc_net() static Adrian Bunk
2008-07-22 19:13 ` Pavel Emelyanov [this message]
2008-07-22 21:19   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4886313C.3000200@openvz.org \
    --to=xemul@openvz.org \
    --cc=bunk@kernel.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).