From 901359256b2666f52a3a7d3f31927677e91b3a2a Mon Sep 17 00:00:00 2001 From: David Teigland Date: Fri, 20 Jan 2006 08:47:07 +0000 Subject: [DLM] Update DLM to the latest patch level Signed-off-by: David Teigland Signed-off-by: Steve Whitehouse --- fs/dlm/requestqueue.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'fs/dlm/requestqueue.c') diff --git a/fs/dlm/requestqueue.c b/fs/dlm/requestqueue.c index 36afe99e4f93..7b2b089634a2 100644 --- a/fs/dlm/requestqueue.c +++ b/fs/dlm/requestqueue.c @@ -47,9 +47,9 @@ void dlm_add_requestqueue(struct dlm_ls *ls, int nodeid, struct dlm_header *hd) e->nodeid = nodeid; memcpy(e->request, hd, length); - down(&ls->ls_requestqueue_lock); + mutex_lock(&ls->ls_requestqueue_mutex); list_add_tail(&e->list, &ls->ls_requestqueue); - up(&ls->ls_requestqueue_lock); + mutex_unlock(&ls->ls_requestqueue_mutex); } int dlm_process_requestqueue(struct dlm_ls *ls) @@ -58,19 +58,19 @@ int dlm_process_requestqueue(struct dlm_ls *ls) struct dlm_header *hd; int error = 0; - down(&ls->ls_requestqueue_lock); + mutex_lock(&ls->ls_requestqueue_mutex); for (;;) { if (list_empty(&ls->ls_requestqueue)) { - up(&ls->ls_requestqueue_lock); + mutex_unlock(&ls->ls_requestqueue_mutex); error = 0; break; } e = list_entry(ls->ls_requestqueue.next, struct rq_entry, list); - up(&ls->ls_requestqueue_lock); + mutex_unlock(&ls->ls_requestqueue_mutex); hd = (struct dlm_header *) e->request; - error = dlm_receive_message(hd, e->nodeid, TRUE); + error = dlm_receive_message(hd, e->nodeid, 1); if (error == -EINTR) { /* entry is left on requestqueue */ @@ -78,13 +78,13 @@ int dlm_process_requestqueue(struct dlm_ls *ls) break; } - down(&ls->ls_requestqueue_lock); + mutex_lock(&ls->ls_requestqueue_mutex); list_del(&e->list); kfree(e); if (dlm_locking_stopped(ls)) { log_debug(ls, "process_requestqueue abort running"); - up(&ls->ls_requestqueue_lock); + mutex_unlock(&ls->ls_requestqueue_mutex); error = -EINTR; break; } @@ -105,15 +105,15 @@ int dlm_process_requestqueue(struct dlm_ls *ls) void dlm_wait_requestqueue(struct dlm_ls *ls) { for (;;) { - down(&ls->ls_requestqueue_lock); + mutex_lock(&ls->ls_requestqueue_mutex); if (list_empty(&ls->ls_requestqueue)) break; if (dlm_locking_stopped(ls)) break; - up(&ls->ls_requestqueue_lock); + mutex_unlock(&ls->ls_requestqueue_mutex); schedule(); } - up(&ls->ls_requestqueue_lock); + mutex_unlock(&ls->ls_requestqueue_mutex); } static int purge_request(struct dlm_ls *ls, struct dlm_message *ms, int nodeid) @@ -170,7 +170,7 @@ void dlm_purge_requestqueue(struct dlm_ls *ls) struct dlm_message *ms; struct rq_entry *e, *safe; - down(&ls->ls_requestqueue_lock); + mutex_lock(&ls->ls_requestqueue_mutex); list_for_each_entry_safe(e, safe, &ls->ls_requestqueue, list) { ms = (struct dlm_message *) e->request; @@ -179,6 +179,6 @@ void dlm_purge_requestqueue(struct dlm_ls *ls) kfree(e); } } - up(&ls->ls_requestqueue_lock); + mutex_unlock(&ls->ls_requestqueue_mutex); } -- cgit v1.2.3