Whamcloud - gitweb
LU-3031 ldlm: disconnect speedup
[fs/lustre-release.git] / lustre / ldlm / ldlm_resource.c
index 084ad80..dcea937 100644 (file)
@@ -801,11 +801,10 @@ static void cleanup_resource(struct ldlm_resource *res, struct list_head *q,
                         if (rc)
                                 CERROR("ldlm_cli_cancel: %d\n", rc);
                 } else {
-                        ldlm_resource_unlink_lock(lock);
                         unlock_res(res);
                         LDLM_DEBUG(lock, "Freeing a lock still held by a "
                                    "client node");
-                        ldlm_lock_destroy(lock);
+                       ldlm_lock_cancel(lock);
                 }
                 LDLM_LOCK_RELEASE(lock);
         } while (1);
@@ -955,6 +954,7 @@ void ldlm_namespace_free_prior(struct ldlm_namespace *ns,
         }
         EXIT;
 }
+EXPORT_SYMBOL(ldlm_namespace_free_prior);
 
 /**
  * Performs freeing memory structures related to \a ns. This is only done
@@ -986,6 +986,7 @@ void ldlm_namespace_free_post(struct ldlm_namespace *ns)
        ldlm_put_ref();
        EXIT;
 }
+EXPORT_SYMBOL(ldlm_namespace_free_post);
 
 /**
  * Cleanup the resource, and free namespace.