Whamcloud - gitweb
LU-1048 ldiskfs: fix dynlock cache entry freeing
authorOleg Drokin <green@whamcloud.com>
Sat, 28 Jan 2012 01:26:53 +0000 (20:26 -0500)
committerOleg Drokin <green@whamcloud.com>
Fri, 3 Feb 2012 01:27:44 +0000 (20:27 -0500)
Update to rhel6.2 broke dynlocks patch and the last hunk was
ignored by quilt/patch.
This commit rediffs the proper patch against 2.6.32-220.el6

Change-Id: If9020458d07c7c2dc714b3e38587f66c4846f806
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/2034
Tested-by: Hudson
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
ldiskfs/kernel_patches/patches/ext4-dynlocks-common-rhel6.patch

index 1a2675d..e47037d 100644 (file)
@@ -122,7 +122,7 @@ Index: linux-stage/fs/ext4/dynlocks.c
 +              goto found;
 +      }
 +      spin_unlock(&dl->dl_list_lock);
 +              goto found;
 +      }
 +      spin_unlock(&dl->dl_list_lock);
-+      
++
 +      /* lock not found and we haven't allocated lock yet. allocate it */
 +      nhl = kmem_cache_alloc(dynlock_cachep, gfp);
 +      if (nhl == NULL)
 +      /* lock not found and we haven't allocated lock yet. allocate it */
 +      nhl = kmem_cache_alloc(dynlock_cachep, gfp);
 +      if (nhl == NULL)
@@ -179,7 +179,7 @@ Index: linux-stage/fs/ext4/dynlocks.c
 +void dynlock_unlock(struct dynlock *dl, struct dynlock_handle *hl)
 +{
 +      int wakeup = 0;
 +void dynlock_unlock(struct dynlock *dl, struct dynlock_handle *hl)
 +{
 +      int wakeup = 0;
-+      
++
 +      BUG_ON(dl == NULL);
 +      BUG_ON(hl == NULL);
 +      BUG_ON(dl->dl_magic != DYNLOCK_LIST_MAGIC);
 +      BUG_ON(dl == NULL);
 +      BUG_ON(hl == NULL);
 +      BUG_ON(dl->dl_magic != DYNLOCK_LIST_MAGIC);
@@ -295,7 +295,7 @@ Index: linux-stage/fs/ext4/super.c
 ===================================================================
 --- linux-stage.orig/fs/ext4/super.c
 +++ linux-stage/fs/ext4/super.c
 ===================================================================
 --- linux-stage.orig/fs/ext4/super.c
 +++ linux-stage/fs/ext4/super.c
-@@ -4125,20 +4125,23 @@ static int __init init_ext4_fs(void)
+@@ -4620,20 +4620,23 @@ static int __init init_ext4_fs(void)
                return err;
        ext4_kset = kset_create_and_add("ext4", NULL, fs_kobj);
        if (!ext4_kset)
                return err;
        ext4_kset = kset_create_and_add("ext4", NULL, fs_kobj);
        if (!ext4_kset)
@@ -303,7 +303,7 @@ Index: linux-stage/fs/ext4/super.c
 +              goto out5;
        ext4_proc_root = proc_mkdir("fs/ext4", NULL);
  
 +              goto out5;
        ext4_proc_root = proc_mkdir("fs/ext4", NULL);
  
-       err = ext4_init_feat_adverts();
+       err = ext4_init_feat_adverts();
  
        err = init_ext4_mballoc();
        if (err)
  
        err = init_ext4_mballoc();
        if (err)
@@ -320,10 +320,10 @@ Index: linux-stage/fs/ext4/super.c
 +      err = dynlock_cache_init();
 +      if (err)
                goto out1;
 +      err = dynlock_cache_init();
 +      if (err)
                goto out1;
-       ext4_li_info = NULL;
-@@ -4125,14 +4125,16 @@ static int __init init_ext4_fs(void)
-               goto out;
+       err = register_filesystem(&ext4_fs_type);
+       if (err)
+@@ -4643,16 +4646,18 @@ static int __init init_ext4_fs(void)
+       mutex_init(&ext4_li_mtx);
        return 0;
  out:
 -      destroy_inodecache();
        return 0;
  out:
 -      destroy_inodecache();
@@ -337,7 +337,7 @@ Index: linux-stage/fs/ext4/super.c
  out3:
 +      exit_ext4_mballoc();
 +out4:
  out3:
 +      exit_ext4_mballoc();
 +out4:
-       ext4_exit_feat_adverts();
+       ext4_exit_feat_adverts();
        remove_proc_entry("fs/ext4", NULL);
        kset_unregister(ext4_kset);
 -out4:
        remove_proc_entry("fs/ext4", NULL);
        kset_unregister(ext4_kset);
 -out4:
@@ -345,9 +345,9 @@ Index: linux-stage/fs/ext4/super.c
        exit_ext4_system_zone();
        return err;
  }
        exit_ext4_system_zone();
        return err;
  }
-@@ -4158,6 +4163,7 @@ out4:
- static void __exit exit_ext4_fs(void)
+@@ -4661,6 +4666,7 @@ static void __exit exit_ext4_fs(void)
  {
  {
+       ext4_destroy_lazyinit_thread();
        unregister_filesystem(&ext4_fs_type);
 +      dynlock_cache_exit();
        destroy_inodecache();
        unregister_filesystem(&ext4_fs_type);
 +      dynlock_cache_exit();
        destroy_inodecache();