Whamcloud - gitweb
- Remove cancelled locks from the waiting list. Revoking locks from a dead
authorshaver <shaver>
Wed, 25 Sep 2002 19:43:33 +0000 (19:43 +0000)
committershaver <shaver>
Wed, 25 Sep 2002 19:43:33 +0000 (19:43 +0000)
  client to service another client now seems to work quite well.  (The dead
  client can even reconnect successfully.)

lustre/include/linux/lustre_dlm.h
lustre/ldlm/ldlm_lock.c
lustre/ldlm/ldlm_lockd.c

index 8fb5e3e..874dcc1 100644 (file)
@@ -255,6 +255,7 @@ int ldlm_extent_policy(struct ldlm_lock *, void *, ldlm_mode_t, void *);
 int ldlm_handle_enqueue(struct ptlrpc_request *req);
 int ldlm_handle_convert(struct ptlrpc_request *req);
 int ldlm_handle_cancel(struct ptlrpc_request *req);
+int ldlm_del_waiting_lock(struct ldlm_lock *lock);
 
 /* ldlm_lock.c */
 void ldlm_register_intent(int (*arg)(struct ldlm_lock *lock, void *req_cookie,
index 27c6c6f..17eb283 100644 (file)
@@ -807,6 +807,7 @@ void ldlm_lock_cancel(struct ldlm_lock *lock)
 
         ldlm_cancel_callback(lock);
 
+        ldlm_del_waiting_lock(lock);
         ldlm_resource_unlink_lock(lock);
         ldlm_lock_destroy(lock);
         l_unlock(&ns->ns_lock);
index 4166887..5e278c8 100644 (file)
@@ -94,7 +94,7 @@ static int ldlm_add_waiting_lock(struct ldlm_lock *lock)
  * callback arrive without incident.  This adjusts the lock-timeout timer if
  * needed.  Returns 0 if the lock wasn't pending after all, 1 if it was.
  */
-static int ldlm_del_waiting_lock(struct ldlm_lock *lock)
+int ldlm_del_waiting_lock(struct ldlm_lock *lock)
 {
         struct list_head *list_next;