aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/ast.c
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2006-01-20 03:47:07 -0500
committerSteven Whitehouse <steve@chygwyn.com>2006-01-20 03:47:07 -0500
commit901359256b2666f52a3a7d3f31927677e91b3a2a (patch)
tree24d4ee2c1ad63a0e6c3a303ad67eac3342772c4f /fs/dlm/ast.c
parentec5800246607183a1d7fd0bae5f087c12439e9e7 (diff)
[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;
21static spinlock_t ast_queue_lock; 21static spinlock_t ast_queue_lock;
22static struct task_struct * astd_task; 22static struct task_struct * astd_task;
23static unsigned long astd_wakeflags; 23static unsigned long astd_wakeflags;
24static struct semaphore astd_running; 24static struct mutex astd_running;
25 25
26 26
27void dlm_del_ast(struct dlm_lkb *lkb) 27void dlm_del_ast(struct dlm_lkb *lkb)
@@ -56,7 +56,7 @@ static void process_asts(void)
56 int type = 0, found, bmode; 56 int type = 0, found, bmode;
57 57
58 for (;;) { 58 for (;;) {
59 found = FALSE; 59 found = 0;
60 spin_lock(&ast_queue_lock); 60 spin_lock(&ast_queue_lock);
61 list_for_each_entry(lkb, &ast_queue, lkb_astqueue) { 61 list_for_each_entry(lkb, &ast_queue, lkb_astqueue) {
62 r = lkb->lkb_resource; 62 r = lkb->lkb_resource;
@@ -68,7 +68,7 @@ static void process_asts(void)
68 list_del(&lkb->lkb_astqueue); 68 list_del(&lkb->lkb_astqueue);
69 type = lkb->lkb_ast_type; 69 type = lkb->lkb_ast_type;
70 lkb->lkb_ast_type = 0; 70 lkb->lkb_ast_type = 0;
71 found = TRUE; 71 found = 1;
72 break; 72 break;
73 } 73 }
74 spin_unlock(&ast_queue_lock); 74 spin_unlock(&ast_queue_lock);
@@ -117,10 +117,10 @@ static int dlm_astd(void *data)
117 schedule(); 117 schedule();
118 set_current_state(TASK_RUNNING); 118 set_current_state(TASK_RUNNING);
119 119
120 down(&astd_running); 120 mutex_lock(&astd_running);
121 if (test_and_clear_bit(WAKE_ASTS, &astd_wakeflags)) 121 if (test_and_clear_bit(WAKE_ASTS, &astd_wakeflags))
122 process_asts(); 122 process_asts();
123 up(&astd_running); 123 mutex_unlock(&astd_running);
124 } 124 }
125 return 0; 125 return 0;
126} 126}
@@ -140,7 +140,7 @@ int dlm_astd_start(void)
140 140
141 INIT_LIST_HEAD(&ast_queue); 141 INIT_LIST_HEAD(&ast_queue);
142 spin_lock_init(&ast_queue_lock); 142 spin_lock_init(&ast_queue_lock);
143 init_MUTEX(&astd_running); 143 mutex_init(&astd_running);
144 144
145 p = kthread_run(dlm_astd, NULL, "dlm_astd"); 145 p = kthread_run(dlm_astd, NULL, "dlm_astd");
146 if (IS_ERR(p)) 146 if (IS_ERR(p))
@@ -157,11 +157,11 @@ void dlm_astd_stop(void)
157 157
158void dlm_astd_suspend(void) 158void dlm_astd_suspend(void)
159{ 159{
160 down(&astd_running); 160 mutex_lock(&astd_running);
161} 161}
162 162
163void dlm_astd_resume(void) 163void dlm_astd_resume(void)
164{ 164{
165 up(&astd_running); 165 mutex_unlock(&astd_running);
166} 166}
167 167