diff options
Diffstat (limited to 'drivers/md/kcopyd.c')
-rw-r--r-- | drivers/md/kcopyd.c | 11 |
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 | *---------------------------------------------------------------*/ |
584 | static DECLARE_MUTEX(_client_lock); | 585 | static DEFINE_MUTEX(_client_lock); |
585 | static LIST_HEAD(_clients); | 586 | static LIST_HEAD(_clients); |
586 | 587 | ||
587 | static void client_add(struct kcopyd_client *kc) | 588 | static 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 | ||
594 | static void client_del(struct kcopyd_client *kc) | 595 | static 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 | ||
601 | static DEFINE_MUTEX(kcopyd_init_lock); | 602 | static DEFINE_MUTEX(kcopyd_init_lock); |