aboutsummaryrefslogtreecommitdiff
path: root/drivers/md/kcopyd.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2006-03-27 01:18:20 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 08:45:03 -0800
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 ed71f3f9462..72480a48d88 100644
--- a/drivers/md/kcopyd.c
+++ b/drivers/md/kcopyd.c
@@ -22,6 +22,7 @@
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/workqueue.h>
+#include <linux/mutex.h>
#include "kcopyd.h"
@@ -581,21 +582,21 @@ int kcopyd_cancel(struct kcopyd_job *job, int block)
/*-----------------------------------------------------------------
* Unit setup
*---------------------------------------------------------------*/
-static DECLARE_MUTEX(_client_lock);
+static DEFINE_MUTEX(_client_lock);
static LIST_HEAD(_clients);
static void client_add(struct kcopyd_client *kc)
{
- down(&_client_lock);
+ mutex_lock(&_client_lock);
list_add(&kc->list, &_clients);
- up(&_client_lock);
+ mutex_unlock(&_client_lock);
}
static void client_del(struct kcopyd_client *kc)
{
- down(&_client_lock);
+ mutex_lock(&_client_lock);
list_del(&kc->list);
- up(&_client_lock);
+ mutex_unlock(&_client_lock);
}
static DEFINE_MUTEX(kcopyd_init_lock);