Whamcloud - gitweb
Revert "LU-607 Avoid race between ldlm_pools_shrink and ldlm_namespace_free"
authorJohann Lombardi <johann@whamcloud.com>
Fri, 23 Sep 2011 08:50:32 +0000 (10:50 +0200)
committerJohann Lombardi <johann@whamcloud.com>
Fri, 23 Sep 2011 08:51:29 +0000 (10:51 +0200)
This reverts commit ba79e90a7028e2637e64367535715c81729f4cb2.
This patch is causing conf-sanity subtest 23a to fail.

Change-Id: I35f27ba55bb12a3d231f34e4764aa48a71025b4b
Signed-off-by: Johann Lombardi <johann@whamcloud.com>
lustre/ldlm/ldlm_resource.c

index 7a0e895..62a285e 100644 (file)
@@ -584,8 +584,6 @@ void ldlm_namespace_free_prior(struct ldlm_namespace *ns,
                 return;
         }
 
-        /* Make sure that nobody can find this ns in its list. */
-        ldlm_namespace_unregister(ns, ns->ns_client);
 
         /* Can fail with -EINTR when force == 0 in which case try harder */
         rc = __ldlm_namespace_free(ns, force);
@@ -611,6 +609,9 @@ void ldlm_namespace_free_post(struct ldlm_namespace *ns)
                 return;
         }
 
+        /* Make sure that nobody can find this ns in its list. */
+        ldlm_namespace_unregister(ns, ns->ns_client);
+
         /* Fini pool _before_ parent proc dir is removed. This is important
          * as ldlm_pool_fini() removes own proc dir which is child to @dir.
          * Removing it after @dir may cause oops. */