[DLM] schedule during long loop through locks
authorDavid Teigland <teigland@redhat.com>
Tue, 25 Jul 2006 19:05:09 +0000 (14:05 -0500)
committerSteven Whitehouse <swhiteho@redhat.com>
Wed, 26 Jul 2006 12:42:57 +0000 (08:42 -0400)
The loop through all waiting locks in recover_waiters can potentially be
long, so we should schedule explicitly.

Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/dlm/lock.c

index eaad28e51ec99474c8226d47977d19f555971864..7d38f914c5b97e4aad0b5c7b5d44a01b048b9140 100644 (file)
@@ -3193,6 +3193,7 @@ void dlm_recover_waiters_pre(struct dlm_ls *ls)
                        log_error(ls, "invalid lkb wait_type %d",
                                  lkb->lkb_wait_type);
                }
+               schedule();
        }
        mutex_unlock(&ls->ls_waiters_mutex);
 }