From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Jes Sorensen <jes@sgi.com>
Cc: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org,
David Brownell <david-b@pacbell.net>
Subject: Re: [patch] fix static linking of NFS
Date: Tue, 27 Jun 2006 12:33:49 -0400 [thread overview]
Message-ID: <1151426029.23773.7.camel@lade.trondhjem.org> (raw)
In-Reply-To: <yq04py7j699.fsf@jaguar.mkp.net>
On Tue, 2006-06-27 at 05:29 -0400, Jes Sorensen wrote:
> Hi,
>
> This patch solved the problem where certain functions in the NFS code
> goes missing due to the __exit section being discarded for static
> links.
>
> I saw one other version of this patch from David Brownell, but it had
> clutter left on the lines where the __exit should simply be removed.
>
> Cheers,
> Jes
>
> Remove __exit declarations from functions called from __init code to
> avoid link errors when the __exit section is discarded, eg NFS is
> linked statically into the kernel.
>
> Signed-off-by: Jes Sorensen <jes@sgi.com>
Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cheers,
Trond
> ---
> fs/nfs/direct.c | 2 +-
> fs/nfs/inode.c | 2 +-
> fs/nfs/pagelist.c | 2 +-
> fs/nfs/read.c | 2 +-
> fs/nfs/write.c | 2 +-
> 5 files changed, 5 insertions(+), 5 deletions(-)
>
> Index: linux-2.6/fs/nfs/direct.c
> ===================================================================
> --- linux-2.6.orig/fs/nfs/direct.c
> +++ linux-2.6/fs/nfs/direct.c
> @@ -909,7 +909,7 @@ int __init nfs_init_directcache(void)
> * nfs_destroy_directcache - destroy the slab cache for nfs_direct_req structures
> *
> */
> -void __exit nfs_destroy_directcache(void)
> +void nfs_destroy_directcache(void)
> {
> if (kmem_cache_destroy(nfs_direct_cachep))
> printk(KERN_INFO "nfs_direct_cache: not all structures were freed\n");
> Index: linux-2.6/fs/nfs/inode.c
> ===================================================================
> --- linux-2.6.orig/fs/nfs/inode.c
> +++ linux-2.6/fs/nfs/inode.c
> @@ -1132,7 +1132,7 @@ static int __init nfs_init_inodecache(vo
> return 0;
> }
>
> -static void __exit nfs_destroy_inodecache(void)
> +static void nfs_destroy_inodecache(void)
> {
> if (kmem_cache_destroy(nfs_inode_cachep))
> printk(KERN_INFO "nfs_inode_cache: not all structures were freed\n");
> Index: linux-2.6/fs/nfs/pagelist.c
> ===================================================================
> --- linux-2.6.orig/fs/nfs/pagelist.c
> +++ linux-2.6/fs/nfs/pagelist.c
> @@ -390,7 +390,7 @@ int __init nfs_init_nfspagecache(void)
> return 0;
> }
>
> -void __exit nfs_destroy_nfspagecache(void)
> +void nfs_destroy_nfspagecache(void)
> {
> if (kmem_cache_destroy(nfs_page_cachep))
> printk(KERN_INFO "nfs_page: not all structures were freed\n");
> Index: linux-2.6/fs/nfs/read.c
> ===================================================================
> --- linux-2.6.orig/fs/nfs/read.c
> +++ linux-2.6/fs/nfs/read.c
> @@ -711,7 +711,7 @@ int __init nfs_init_readpagecache(void)
> return 0;
> }
>
> -void __exit nfs_destroy_readpagecache(void)
> +void nfs_destroy_readpagecache(void)
> {
> mempool_destroy(nfs_rdata_mempool);
> if (kmem_cache_destroy(nfs_rdata_cachep))
> Index: linux-2.6/fs/nfs/write.c
> ===================================================================
> --- linux-2.6.orig/fs/nfs/write.c
> +++ linux-2.6/fs/nfs/write.c
> @@ -1551,7 +1551,7 @@ int __init nfs_init_writepagecache(void)
> return 0;
> }
>
> -void __exit nfs_destroy_writepagecache(void)
> +void nfs_destroy_writepagecache(void)
> {
> mempool_destroy(nfs_commit_mempool);
> mempool_destroy(nfs_wdata_mempool);
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2006-06-27 16:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-27 9:29 Jes Sorensen
2006-06-27 16:33 ` Trond Myklebust [this message]
2006-06-27 16:44 ` Trond Myklebust
2006-06-27 19:01 ` Jes Sorensen
2006-06-27 19:21 ` David Brownell
2006-06-27 19:59 ` David Brownell
2006-06-27 20:08 ` Trond Myklebust
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=1151426029.23773.7.camel@lade.trondhjem.org \
--to=trond.myklebust@fys.uio.no \
--cc=akpm@osdl.org \
--cc=david-b@pacbell.net \
--cc=jes@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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
all inboxes | Powered by JetHome®