diff mbox

[1/15] NFSv4.1: don't export static symbol

Message ID 1426092997-30605-2-git-send-email-Julia.Lawall@lip6.fr (mailing list archive)
State New, archived
Headers show

Commit Message

Julia Lawall March 11, 2015, 4:56 p.m. UTC
From: Julia Lawall <Julia.Lawall@lip6.fr>

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
type T;
identifier f;
@@

static T f (...) { ... }

@@
identifier r.f;
declarer name EXPORT_SYMBOL_GPL;
@@

-EXPORT_SYMBOL_GPL(f);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 fs/nfs/pnfs.c |    2 --
 1 file changed, 2 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Trond Myklebust March 12, 2015, 3:59 p.m. UTC | #1
On Wed, 2015-03-11 at 17:56 +0100, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> The semantic patch that fixes this problem is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // <smpl>
> @r@
> type T;
> identifier f;
> @@
> 
> static T f (...) { ... }
> 
> @@
> identifier r.f;
> declarer name EXPORT_SYMBOL_GPL;
> @@
> 
> -EXPORT_SYMBOL_GPL(f);
> // </smpl>
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> ---
>  fs/nfs/pnfs.c |    2 --
>  1 file changed, 2 deletions(-)
> 
> diff -u -p a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
> --- a/fs/nfs/pnfs.c
> +++ b/fs/nfs/pnfs.c
> @@ -1902,7 +1902,6 @@ static void pnfs_writehdr_free(struct nf
>  	pnfs_put_lseg(hdr->lseg);
>  	nfs_pgio_header_free(hdr);
>  }
> -EXPORT_SYMBOL_GPL(pnfs_writehdr_free);
>  
>  int
>  pnfs_generic_pg_writepages(struct nfs_pageio_descriptor *desc)
> @@ -2032,7 +2031,6 @@ static void pnfs_readhdr_free(struct nfs
>  	pnfs_put_lseg(hdr->lseg);
>  	nfs_pgio_header_free(hdr);
>  }
> -EXPORT_SYMBOL_GPL(pnfs_readhdr_free);
>  
>  int
>  pnfs_generic_pg_readpages(struct nfs_pageio_descriptor *desc)
> 

Thanks Julia! Applied....
diff mbox

Patch

diff -u -p a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1902,7 +1902,6 @@  static void pnfs_writehdr_free(struct nf
 	pnfs_put_lseg(hdr->lseg);
 	nfs_pgio_header_free(hdr);
 }
-EXPORT_SYMBOL_GPL(pnfs_writehdr_free);
 
 int
 pnfs_generic_pg_writepages(struct nfs_pageio_descriptor *desc)
@@ -2032,7 +2031,6 @@  static void pnfs_readhdr_free(struct nfs
 	pnfs_put_lseg(hdr->lseg);
 	nfs_pgio_header_free(hdr);
 }
-EXPORT_SYMBOL_GPL(pnfs_readhdr_free);
 
 int
 pnfs_generic_pg_readpages(struct nfs_pageio_descriptor *desc)