diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/dm-kcopyd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/md/dm-kcopyd.c b/drivers/md/dm-kcopyd.c index 3e3fc06cb861..addf83475040 100644 --- a/drivers/md/dm-kcopyd.c +++ b/drivers/md/dm-kcopyd.c | |||
@@ -450,7 +450,10 @@ static void dispatch_job(struct kcopyd_job *job) | |||
450 | { | 450 | { |
451 | struct dm_kcopyd_client *kc = job->kc; | 451 | struct dm_kcopyd_client *kc = job->kc; |
452 | atomic_inc(&kc->nr_jobs); | 452 | atomic_inc(&kc->nr_jobs); |
453 | push(&kc->pages_jobs, job); | 453 | if (unlikely(!job->source.count)) |
454 | push(&kc->complete_jobs, job); | ||
455 | else | ||
456 | push(&kc->pages_jobs, job); | ||
454 | wake(kc); | 457 | wake(kc); |
455 | } | 458 | } |
456 | 459 | ||