linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nfs: do not export discarded symbols
@ 2015-03-11 13:37 Arnd Bergmann
  2015-03-11 14:52 ` Baruch Siach
  2015-03-12 15:58 ` Trond Myklebust
  0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2015-03-11 13:37 UTC (permalink / raw)
  To: Trond Myklebust
  Cc: Peng Tao, Tom Haynes, linux-nfs, Anna Schumaker,
	linux-arm-kernel, linux-kernel

The function nfs4_pnfs_v3_ds_connect_unload is exported so it can be
used by other modules, but is also marked '__exit' and will be
discarded when built into the kernel, as pointed out by this
linker error:

`nfs4_pnfs_v3_ds_connect_unload' referenced in section `___ksymtab_gpl+nfs4_pnfs_v3_ds_connect_unload' of fs/built-in.o: defined in discarded section `.exit.text' of fs/built-in.o

This removes the __exit annotation to make it safe to call this function.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 5f01d9539496 ("nfs41: create NFSv3 DS connection if specified")

diff --git a/fs/nfs/pnfs_nfs.c b/fs/nfs/pnfs_nfs.c
index 54e36b38fb5f..8582dae5ae99 100644
--- a/fs/nfs/pnfs_nfs.c
+++ b/fs/nfs/pnfs_nfs.c
@@ -561,7 +561,7 @@ static bool load_v3_ds_connect(void)
 	return(get_v3_ds_connect != NULL);
 }
 
-void __exit nfs4_pnfs_v3_ds_connect_unload(void)
+void nfs4_pnfs_v3_ds_connect_unload(void)
 {
 	if (get_v3_ds_connect) {
 		symbol_put(nfs3_set_ds_client);


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] nfs: do not export discarded symbols
  2015-03-11 13:37 [PATCH] nfs: do not export discarded symbols Arnd Bergmann
@ 2015-03-11 14:52 ` Baruch Siach
  2015-03-12 15:58 ` Trond Myklebust
  1 sibling, 0 replies; 4+ messages in thread
From: Baruch Siach @ 2015-03-11 14:52 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Trond Myklebust, linux-nfs, linux-kernel, Peng Tao, Tom Haynes,
	Anna Schumaker, linux-arm-kernel

Hi Arnd,

On Wed, Mar 11, 2015 at 02:37:25PM +0100, Arnd Bergmann wrote:
> The function nfs4_pnfs_v3_ds_connect_unload is exported so it can be
> used by other modules, but is also marked '__exit' and will be
> discarded when built into the kernel, as pointed out by this
> linker error:
> 
> `nfs4_pnfs_v3_ds_connect_unload' referenced in section `___ksymtab_gpl+nfs4_pnfs_v3_ds_connect_unload' of fs/built-in.o: defined in discarded section `.exit.text' of fs/built-in.o
> 
> This removes the __exit annotation to make it safe to call this function.

Should be "do not discard exported symbols" in subject then?

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] nfs: do not export discarded symbols
  2015-03-11 13:37 [PATCH] nfs: do not export discarded symbols Arnd Bergmann
  2015-03-11 14:52 ` Baruch Siach
@ 2015-03-12 15:58 ` Trond Myklebust
  2015-04-09  9:33   ` Arnd Bergmann
  1 sibling, 1 reply; 4+ messages in thread
From: Trond Myklebust @ 2015-03-12 15:58 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Peng Tao, Tom Haynes, linux-nfs, Anna Schumaker,
	linux-arm-kernel, linux-kernel

On Wed, 2015-03-11 at 14:37 +0100, Arnd Bergmann wrote:
> The function nfs4_pnfs_v3_ds_connect_unload is exported so it can be
> used by other modules, but is also marked '__exit' and will be
> discarded when built into the kernel, as pointed out by this
> linker error:
> 
> `nfs4_pnfs_v3_ds_connect_unload' referenced in section `___ksymtab_gpl+nfs4_pnfs_v3_ds_connect_unload' of fs/built-in.o: defined in discarded section `.exit.text' of fs/built-in.o
> 
> This removes the __exit annotation to make it safe to call this function.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 5f01d9539496 ("nfs41: create NFSv3 DS connection if specified")
> 
> diff --git a/fs/nfs/pnfs_nfs.c b/fs/nfs/pnfs_nfs.c
> index 54e36b38fb5f..8582dae5ae99 100644
> --- a/fs/nfs/pnfs_nfs.c
> +++ b/fs/nfs/pnfs_nfs.c
> @@ -561,7 +561,7 @@ static bool load_v3_ds_connect(void)
>  	return(get_v3_ds_connect != NULL);
>  }
>  
> -void __exit nfs4_pnfs_v3_ds_connect_unload(void)
> +void nfs4_pnfs_v3_ds_connect_unload(void)
>  {
>  	if (get_v3_ds_connect) {
>  		symbol_put(nfs3_set_ds_client);
> 

Thanks! Applied...
-- 
Trond Myklebust
Linux NFS client maintainer, PrimaryData
trond.myklebust@primarydata.com





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] nfs: do not export discarded symbols
  2015-03-12 15:58 ` Trond Myklebust
@ 2015-04-09  9:33   ` Arnd Bergmann
  0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2015-04-09  9:33 UTC (permalink / raw)
  To: Trond Myklebust
  Cc: Peng Tao, Tom Haynes, linux-nfs, Anna Schumaker,
	linux-arm-kernel, linux-kernel

On Thursday 12 March 2015 11:58:38 Trond Myklebust wrote:
> On Wed, 2015-03-11 at 14:37 +0100, Arnd Bergmann wrote:
> > The function nfs4_pnfs_v3_ds_connect_unload is exported so it can be
> > used by other modules, but is also marked '__exit' and will be
> > discarded when built into the kernel, as pointed out by this
> > linker error:
> > 
> > `nfs4_pnfs_v3_ds_connect_unload' referenced in section `___ksymtab_gpl+nfs4_pnfs_v3_ds_connect_unload' of fs/built-in.o: defined in discarded section `.exit.text' of fs/built-in.o
> > 
> > This removes the __exit annotation to make it safe to call this function.
> > 
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> > Fixes: 5f01d9539496 ("nfs41: create NFSv3 DS connection if specified")
> > 
> > diff --git a/fs/nfs/pnfs_nfs.c b/fs/nfs/pnfs_nfs.c
> > index 54e36b38fb5f..8582dae5ae99 100644
> > --- a/fs/nfs/pnfs_nfs.c
> > +++ b/fs/nfs/pnfs_nfs.c
> > @@ -561,7 +561,7 @@ static bool load_v3_ds_connect(void)
> >       return(get_v3_ds_connect != NULL);
> >  }
> >  
> > -void __exit nfs4_pnfs_v3_ds_connect_unload(void)
> > +void nfs4_pnfs_v3_ds_connect_unload(void)
> >  {
> >       if (get_v3_ds_connect) {
> >               symbol_put(nfs3_set_ds_client);
> > 
> 
> Thanks! Applied...
> 

I don't see the patch in linux-next, did something go wrong here?

	Arnd

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-04-09  9:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-11 13:37 [PATCH] nfs: do not export discarded symbols Arnd Bergmann
2015-03-11 14:52 ` Baruch Siach
2015-03-12 15:58 ` Trond Myklebust
2015-04-09  9:33   ` Arnd Bergmann

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).