mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Boqun Feng <boqun.feng@linux.vnet.ibm.com>
To: Jan Kara <jack@suse.cz>
Cc: Boqun Feng <boqun.feng@gmail.com>,
	Al Viro <viro@ZenIV.linux.org.uk>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Is it OK to export symbols 'getname' and 'putname'?
Date: Wed, 22 Apr 2015 10:38:44 +0800	[thread overview]
Message-ID: <20150422023844.GA32658@fixme-laptop.cn.ibm.com> (raw)
In-Reply-To: <20150420155507.GK17020@quack.suse.cz>

[-- Attachment #1: Type: text/plain, Size: 1589 bytes --]

Hi,

On Mon, Apr 20, 2015 at 05:55:07PM +0200, Jan Kara wrote:
> On Fri 17-04-15 20:35:30, Boqun Feng wrote:
> > Hi Al,
> > 
> > 
> > I'm trying to clean that part of code you mentioned, and I found I have
> > to export the symbols 'getname' and 'putname' as follow to replace that
> > __getname() caller:
> > 
> > diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c
> > index a182019..014f51a 100644
> > --- a/drivers/staging/lustre/lustre/llite/dir.c
> > +++ b/drivers/staging/lustre/lustre/llite/dir.c
> ...
> > +#define ll_getname(filename) getname(filename)
> > +#define ll_putname(name) putname(name)
>   Bonus points for getting rid of these useless defines.

Yeah, make sense.

Thank you for your comments,

Regards,
Boqun

> 
> > diff --git a/fs/namei.c b/fs/namei.c
> > index ffab2e0..7a0948c 100644
> > --- a/fs/namei.c
> > +++ b/fs/namei.c
> > @@ -205,6 +205,7 @@ getname(const char __user * filename)
> >  {
> >  	return getname_flags(filename, 0, NULL);
> >  }
> > +EXPORT_SYMBOL(getname);
> >  
> >  struct filename *
> >  getname_kernel(const char * filename)
> > @@ -254,6 +255,7 @@ void putname(struct filename *name)
> >  	} else
> >  		__putname(name);
> >  }
> > +EXPORT_SYMBOL(putname);
> >  
> >  static int check_acl(struct inode *inode, int mask)
> >  {
> > 
> > 
> > 
> > Is that a good idea to export these symbols, given that lustre may be
> > the only user? 
>   Yes, it is a good idea.
> 
> 								Honza
> -- 
> Jan Kara <jack@suse.cz>
> SUSE Labs, CR

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-04-22  2:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25 18:45 [PATCH v2] vfs: avoid recopying file names in getname_flags Boqun Feng
2015-03-29  4:27 ` Boqun Feng
2015-03-29 10:14   ` Richard Weinberger
2015-03-29 15:23     ` Boqun Feng
2015-04-07  8:38   ` Boqun Feng
2015-04-11 23:56     ` Al Viro
2015-04-12  1:13       ` Al Viro
2015-04-13  7:34         ` Boqun Feng
2015-04-17 12:35         ` Is it OK to export symbols 'getname' and 'putname'? Boqun Feng
2015-04-18  0:20           ` Boqun Feng
2015-04-20 15:55           ` Jan Kara
2015-04-22  2:38             ` Boqun Feng [this message]
2015-04-22  5:50             ` Christoph Hellwig
2015-04-23  5:32               ` Boqun Feng
2015-04-13  6:33       ` [PATCH v2] vfs: avoid recopying file names in getname_flags Boqun Feng
2015-03-29 10:13 ` Richard Weinberger
2015-03-29 15:10   ` Boqun Feng

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=20150422023844.GA32658@fixme-laptop.cn.ibm.com \
    --to=boqun.feng@linux.vnet.ibm.com \
    --cc=boqun.feng@gmail.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /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

all inboxes | Powered by JetHome®