aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/kcopyd.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2006-03-27 04:18:20 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 11:45:03 -0500
commit48c9c27b8bcd2a328a06151e2d5c1170db0b701b (patch)
tree804fb1c410e0a246c92105710f1cd22a9daa8edc /drivers/md/kcopyd.c
parent2f889129de148b0ba2e1fbc9e9d33a4ef4c5f2cb (diff)
[PATCH] sem2mutex: drivers/md
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/kcopyd.c')
-rw-r--r--drivers/md/kcopyd.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/md/kcopyd.c b/drivers/md/kcopyd.c
index ed71f3f94620..72480a48d88b 100644
--- a/drivers/md/kcopyd.c
+++ b/drivers/md/kcopyd.c
@@ -22,6 +22,7 @@
22#include <linux/slab.h> 22#include <linux/slab.h>
23#include <linux/vmalloc.h> 23#include <linux/vmalloc.h>
24#include <linux/workqueue.h> 24#include <linux/workqueue.h>
25#include <linux/mutex.h>
25 26
26#include "kcopyd.h" 27#include "kcopyd.h"
27 28
@@ -581,21 +582,21 @@ int kcopyd_cancel(struct kcopyd_job *job, int block)
581/*----------------------------------------------------------------- 582/*-----------------------------------------------------------------
582 * Unit setup 583 * Unit setup
583 *---------------------------------------------------------------*/ 584 *---------------------------------------------------------------*/
584static DECLARE_MUTEX(_client_lock); 585static DEFINE_MUTEX(_client_lock);
585static LIST_HEAD(_clients); 586static LIST_HEAD(_clients);
586 587
587static void client_add(struct kcopyd_client *kc) 588static void client_add(struct kcopyd_client *kc)
588{ 589{
589 down(&_client_lock); 590 mutex_lock(&_client_lock);
590 list_add(&kc->list, &_clients); 591 list_add(&kc->list, &_clients);
591 up(&_client_lock); 592 mutex_unlock(&_client_lock);
592} 593}
593 594
594static void client_del(struct kcopyd_client *kc) 595static void client_del(struct kcopyd_client *kc)
595{ 596{
596 down(&_client_lock); 597 mutex_lock(&_client_lock);
597 list_del(&kc->list); 598 list_del(&kc->list);
598 up(&_client_lock); 599 mutex_unlock(&_client_lock);
599} 600}
600 601
601static DEFINE_MUTEX(kcopyd_init_lock); 602static DEFINE_MUTEX(kcopyd_init_lock);