Commit 266bee88 authored by David Brownell's avatar David Brownell Committed by Linus Torvalds
Browse files

[PATCH] fix static linking of NFS

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: default avatarDavid Brownell <>
Acked-by: default avatarTrond Myklebust <>
Signed-off-by: default avatarLinus Torvalds <>
parent e7374e48
......@@ -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");
......@@ -1132,7 +1132,7 @@ static int __init nfs_init_inodecache(void)
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");
......@@ -31,15 +31,15 @@ extern struct svc_version nfs4_callback_version1;
/* 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);
extern int __init nfs_init_directcache(void);
extern void __exit nfs_destroy_directcache(void);
extern void nfs_destroy_directcache(void);
#define nfs_init_directcache() (0)
#define nfs_destroy_directcache() do {} while(0)
......@@ -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");
......@@ -711,7 +711,7 @@ int __init nfs_init_readpagecache(void)
return 0;
void __exit nfs_destroy_readpagecache(void)
void nfs_destroy_readpagecache(void)
if (kmem_cache_destroy(nfs_rdata_cachep))
......@@ -1551,7 +1551,7 @@ int __init nfs_init_writepagecache(void)
return 0;
void __exit nfs_destroy_writepagecache(void)
void nfs_destroy_writepagecache(void)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment