Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71717
b: refs/heads/master
c: def5b5b
h: refs/heads/master
i:
  71715: bf4cd3b
v: v3
  • Loading branch information
Matthias Kaehlcke authored and Alasdair G Kergon committed Oct 20, 2007
1 parent ce63bf0 commit 9c5b95f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 094262db9e4c615e0db7a7b924d244b7a6c186b0
refs/heads/master: def5b5b26e6d97820465fadcb7d1cb73cc4daf33
8 changes: 4 additions & 4 deletions trunk/drivers/md/kcopyd.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ struct kcopyd_job {
* These fields are only used if the job has been split
* into more manageable parts.
*/
struct semaphore lock;
struct mutex lock;
atomic_t sub_jobs;
sector_t progress;
};
Expand Down Expand Up @@ -456,7 +456,7 @@ static void segment_complete(int read_err,
sector_t count = 0;
struct kcopyd_job *job = (struct kcopyd_job *) context;

down(&job->lock);
mutex_lock(&job->lock);

/* update the error */
if (read_err)
Expand All @@ -480,7 +480,7 @@ static void segment_complete(int read_err,
job->progress += count;
}
}
up(&job->lock);
mutex_unlock(&job->lock);

if (count) {
int i;
Expand Down Expand Up @@ -562,7 +562,7 @@ int kcopyd_copy(struct kcopyd_client *kc, struct io_region *from,
dispatch_job(job);

else {
init_MUTEX(&job->lock);
mutex_init(&job->lock);
job->progress = 0;
split_job(job);
}
Expand Down

0 comments on commit 9c5b95f

Please sign in to comment.