From: Andreas Dilger Date: Thu, 26 Jan 2012 10:06:30 +0000 (-0700) Subject: LU-687 ldiskfs: resolve section dynlocks mismatch X-Git-Tag: 2.1.56~37 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=182c2f8a6dd1a7d8493e5442656a5071333beb17 LU-687 ldiskfs: resolve section dynlocks mismatch Fix __init/__exit section mismatch. WARNING: lustre-2.1.0/ldiskfs/ldiskfs/ldiskfs.o(.init.text+0x1bc): Section mismatch in reference from the function init_module() to the function .exit.text:dynlock_cache_exit(). An __init init_module() function references a function __exit dynlock_cache_exit(). This is often seen when error handling in the init function uses functionality in the exit path. The fix is often to remove the __exit annotation of dynlock_cache_exit() so it may be used outside an exit section. Signed-off-by: Andreas Dilger Change-Id: Ie0bdde7f78c18bca1127151175cf56bfa6ad500c Reviewed-on: http://review.whamcloud.com/2019 Tested-by: Hudson Reviewed-by: Jinshan Xiong Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/ldiskfs/kernel_patches/patches/ext4-dynlocks-common-rhel6.patch b/ldiskfs/kernel_patches/patches/ext4-dynlocks-common-rhel6.patch index e47037d..c91c8bc 100644 --- a/ldiskfs/kernel_patches/patches/ext4-dynlocks-common-rhel6.patch +++ b/ldiskfs/kernel_patches/patches/ext4-dynlocks-common-rhel6.patch @@ -51,7 +51,7 @@ Index: linux-stage/fs/ext4/dynlocks.c + return rc; +} + -+void __exit dynlock_cache_exit(void) ++void dynlock_cache_exit(void) +{ + /* printk(KERN_INFO "exit dynlocks cache\n"); */ + kmem_cache_destroy(dynlock_cachep); diff --git a/ldiskfs/kernel_patches/patches/ext4-dynlocks-common-sles11.patch b/ldiskfs/kernel_patches/patches/ext4-dynlocks-common-sles11.patch index 97e92d2..a5c39e6 100644 --- a/ldiskfs/kernel_patches/patches/ext4-dynlocks-common-sles11.patch +++ b/ldiskfs/kernel_patches/patches/ext4-dynlocks-common-sles11.patch @@ -52,7 +52,7 @@ diff -rupN 2.6.27.21/fs/ext4/dynlocks.c 2.6.27.21_1//fs/ext4/dynlocks.c + return rc; +} + -+void __exit dynlock_cache_exit(void) ++void dynlock_cache_exit(void) +{ + /* printk(KERN_INFO "exit dynlocks cache\n"); */ + kmem_cache_destroy(dynlock_cachep); diff --git a/ldiskfs/kernel_patches/patches/ext4-dynlocks-common.patch b/ldiskfs/kernel_patches/patches/ext4-dynlocks-common.patch index d2c9cb2..b9dcbd9 100644 --- a/ldiskfs/kernel_patches/patches/ext4-dynlocks-common.patch +++ b/ldiskfs/kernel_patches/patches/ext4-dynlocks-common.patch @@ -50,7 +50,7 @@ diff -rupN linux-2.6.18-128.1.6_1/fs/ext4/dynlocks.c linux-2.6.18-128.1.6_2/fs/e + return rc; +} + -+void __exit dynlock_cache_exit(void) ++void dynlock_cache_exit(void) +{ + /* printk(KERN_INFO "exit dynlocks cache\n"); */ + kmem_cache_destroy(dynlock_cachep);