lkml.org 
[lkml]   [2015]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Is it OK to export symbols 'getname' and 'putname'?
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
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2015-04-22 05:21    [W:0.105 / U:5.876 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site