summaryrefslogtreecommitdiff
path: root/fs/dlm/ast.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2006-01-20 11:47:07 +0300
committerSteven Whitehouse <steve@chygwyn.com>2006-01-20 11:47:07 +0300
commit901359256b2666f52a3a7d3f31927677e91b3a2a (patch)
tree24d4ee2c1ad63a0e6c3a303ad67eac3342772c4f /fs/dlm/ast.c
parentec5800246607183a1d7fd0bae5f087c12439e9e7 (diff)
downloadlinux-901359256b2666f52a3a7d3f31927677e91b3a2a.tar.xz
[DLM] Update DLM to the latest patch level
Signed-off-by: David Teigland <teigland@redhat.com> Signed-off-by: Steve Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/dlm/ast.c')
-rw-r--r--fs/dlm/ast.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/dlm/ast.c b/fs/dlm/ast.c
index 2bd1c5e1a72c..57bdf09b520a 100644
--- a/fs/dlm/ast.c
+++ b/fs/dlm/ast.c
@@ -21,7 +21,7 @@ static struct list_head ast_queue;
static spinlock_t ast_queue_lock;
static struct task_struct * astd_task;
static unsigned long astd_wakeflags;
-static struct semaphore astd_running;
+static struct mutex astd_running;
void dlm_del_ast(struct dlm_lkb *lkb)
@@ -56,7 +56,7 @@ static void process_asts(void)
int type = 0, found, bmode;
for (;;) {
- found = FALSE;
+ found = 0;
spin_lock(&ast_queue_lock);
list_for_each_entry(lkb, &ast_queue, lkb_astqueue) {
r = lkb->lkb_resource;
@@ -68,7 +68,7 @@ static void process_asts(void)
list_del(&lkb->lkb_astqueue);
type = lkb->lkb_ast_type;
lkb->lkb_ast_type = 0;
- found = TRUE;
+ found = 1;
break;
}
spin_unlock(&ast_queue_lock);
@@ -117,10 +117,10 @@ static int dlm_astd(void *data)
schedule();
set_current_state(TASK_RUNNING);
- down(&astd_running);
+ mutex_lock(&astd_running);
if (test_and_clear_bit(WAKE_ASTS, &astd_wakeflags))
process_asts();
- up(&astd_running);
+ mutex_unlock(&astd_running);
}
return 0;
}
@@ -140,7 +140,7 @@ int dlm_astd_start(void)
INIT_LIST_HEAD(&ast_queue);
spin_lock_init(&ast_queue_lock);
- init_MUTEX(&astd_running);
+ mutex_init(&astd_running);
p = kthread_run(dlm_astd, NULL, "dlm_astd");
if (IS_ERR(p))
@@ -157,11 +157,11 @@ void dlm_astd_stop(void)
void dlm_astd_suspend(void)
{
- down(&astd_running);
+ mutex_lock(&astd_running);
}
void dlm_astd_resume(void)
{
- up(&astd_running);
+ mutex_unlock(&astd_running);
}