From: David Brownell <david-b@pacbell.net>
To: Jes Sorensen <jes@sgi.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>,
Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: [patch] fix static linking of NFS
Date: Tue, 27 Jun 2006 12:59:15 -0700 [thread overview]
Message-ID: <200606271259.16408.david-b@pacbell.net> (raw)
In-Reply-To: <200606271221.31927.david-b@pacbell.net>
[-- Attachment #1: Type: text/plain, Size: 400 bytes --]
On Tuesday 27 June 2006 12:21 pm, David Brownell wrote:
> OK here's a version of my patch that I edited to remove the
> comments Jes objected to ... /* init or exit */ to remind
> about the omitted section annotation. Having one of those
> would save multiple kbytes throughout the kernel, and I had
> include the comments as reminders for an eventual fix...
>
> - Dave
>
Once more, with patch.
[-- Attachment #2: nfs.patch --]
[-- Type: text/x-diff, Size: 3950 bytes --]
Builds on ARM report link problems with common configurations like
statically linked NFS (for nfsroot). The symptom is that __init
section code references __exit section code; that won't work since
the exit sections are discarded (since they can never be called).
The best fix for these particular cases would be an "__init_or_exit"
section annotation.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Index: at91/fs/nfs/direct.c
===================================================================
--- at91.orig/fs/nfs/direct.c 2006-06-26 14:28:55.000000000 -0700
+++ at91/fs/nfs/direct.c 2006-06-26 14:32:39.000000000 -0700
@@ -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: at91/fs/nfs/inode.c
===================================================================
--- at91.orig/fs/nfs/inode.c 2006-06-26 14:28:55.000000000 -0700
+++ at91/fs/nfs/inode.c 2006-06-26 14:32:39.000000000 -0700
@@ -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: at91/fs/nfs/internal.h
===================================================================
--- at91.orig/fs/nfs/internal.h 2006-06-26 14:28:55.000000000 -0700
+++ at91/fs/nfs/internal.h 2006-06-26 14:32:39.000000000 -0700
@@ -31,15 +31,15 @@ extern struct svc_version nfs4_callback_
/* pagelist.c */
extern int __init nfs_init_nfspagecache(void);
-extern void __exit nfs_destroy_nfspagecache(void);
+extern void nfs_destroy_nfspagecache(void);
extern int __init nfs_init_readpagecache(void);
-extern void __exit nfs_destroy_readpagecache(void);
+extern void nfs_destroy_readpagecache(void);
extern int __init nfs_init_writepagecache(void);
-extern void __exit nfs_destroy_writepagecache(void);
+extern void nfs_destroy_writepagecache(void);
#ifdef CONFIG_NFS_DIRECTIO
extern int __init nfs_init_directcache(void);
-extern void __exit nfs_destroy_directcache(void);
+extern void nfs_destroy_directcache(void);
#else
#define nfs_init_directcache() (0)
#define nfs_destroy_directcache() do {} while(0)
Index: at91/fs/nfs/pagelist.c
===================================================================
--- at91.orig/fs/nfs/pagelist.c 2006-06-26 14:28:55.000000000 -0700
+++ at91/fs/nfs/pagelist.c 2006-06-26 14:32:39.000000000 -0700
@@ -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: at91/fs/nfs/read.c
===================================================================
--- at91.orig/fs/nfs/read.c 2006-06-26 14:28:55.000000000 -0700
+++ at91/fs/nfs/read.c 2006-06-26 14:32:39.000000000 -0700
@@ -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: at91/fs/nfs/write.c
===================================================================
--- at91.orig/fs/nfs/write.c 2006-06-26 14:28:55.000000000 -0700
+++ at91/fs/nfs/write.c 2006-06-26 14:32:39.000000000 -0700
@@ -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);
next prev parent reply other threads:[~2006-06-27 19:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-27 9:29 [patch] fix static linking of NFS Jes Sorensen
2006-06-27 16:33 ` Trond Myklebust
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 [this message]
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=200606271259.16408.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=akpm@osdl.org \
--cc=jes@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--cc=trond.myklebust@fys.uio.no \
/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