Whamcloud - gitweb
LU-687 ldiskfs: resolve section dynlocks mismatch
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 26 Jan 2012 10:06:30 +0000 (03:06 -0700)
committerOleg Drokin <green@whamcloud.com>
Sat, 11 Feb 2012 02:52:21 +0000 (21:52 -0500)
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 <adilger@whamcloud.com>
Change-Id: Ie0bdde7f78c18bca1127151175cf56bfa6ad500c
Reviewed-on: http://review.whamcloud.com/2019
Tested-by: Hudson
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
ldiskfs/kernel_patches/patches/ext4-dynlocks-common-rhel6.patch
ldiskfs/kernel_patches/patches/ext4-dynlocks-common-sles11.patch
ldiskfs/kernel_patches/patches/ext4-dynlocks-common.patch

index e47037d..c91c8bc 100644 (file)
@@ -51,7 +51,7 @@ Index: linux-stage/fs/ext4/dynlocks.c
 +      return rc;
 +}
 +
 +      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);
 +{
 +      /* printk(KERN_INFO "exit dynlocks cache\n"); */
 +      kmem_cache_destroy(dynlock_cachep);
index 97e92d2..a5c39e6 100644 (file)
@@ -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;
 +}
 +
 +      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);
 +{
 +      /* printk(KERN_INFO "exit dynlocks cache\n"); */
 +      kmem_cache_destroy(dynlock_cachep);
index d2c9cb2..b9dcbd9 100644 (file)
@@ -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;
 +}
 +
 +      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);
 +{
 +      /* printk(KERN_INFO "exit dynlocks cache\n"); */
 +      kmem_cache_destroy(dynlock_cachep);