aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/kcopyd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/kcopyd.c b/drivers/md/kcopyd.c
index 7e052378c47e..f3831f31223e 100644
--- a/drivers/md/kcopyd.c
+++ b/drivers/md/kcopyd.c
@@ -198,7 +198,7 @@ struct kcopyd_job {
198 * These fields are only used if the job has been split 198 * These fields are only used if the job has been split
199 * into more manageable parts. 199 * into more manageable parts.
200 */ 200 */
201 struct semaphore lock; 201 struct mutex lock;
202 atomic_t sub_jobs; 202 atomic_t sub_jobs;
203 sector_t progress; 203 sector_t progress;
204}; 204};
@@ -456,7 +456,7 @@ static void segment_complete(int read_err,
456 sector_t count = 0; 456 sector_t count = 0;
457 struct kcopyd_job *job = (struct kcopyd_job *) context; 457 struct kcopyd_job *job = (struct kcopyd_job *) context;
458 458
459 down(&job->lock); 459 mutex_lock(&job->lock);
460 460
461 /* update the error */ 461 /* update the error */
462 if (read_err) 462 if (read_err)
@@ -480,7 +480,7 @@ static void segment_complete(int read_err,
480 job->progress += count; 480 job->progress += count;
481 } 481 }
482 } 482 }
483 up(&job->lock); 483 mutex_unlock(&job->lock);
484 484
485 if (count) { 485 if (count) {
486 int i; 486 int i;
@@ -562,7 +562,7 @@ int kcopyd_copy(struct kcopyd_client *kc, struct io_region *from,
562 dispatch_job(job); 562 dispatch_job(job);
563 563
564 else { 564 else {
565 init_MUTEX(&job->lock); 565 mutex_init(&job->lock);
566 job->progress = 0; 566 job->progress = 0;
567 split_job(job); 567 split_job(job);
568 } 568 }