]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/md/dm-kcopyd.c
Merge git://git.infradead.org/~dwmw2/mtd-2.6.33
[karo-tx-linux.git] / drivers / md / dm-kcopyd.c
index 3e3fc06cb861cc456f6b3184e4cc9150d4772198..addf83475040d326145d67bad45f535d40c41407 100644 (file)
@@ -450,7 +450,10 @@ static void dispatch_job(struct kcopyd_job *job)
 {
        struct dm_kcopyd_client *kc = job->kc;
        atomic_inc(&kc->nr_jobs);
-       push(&kc->pages_jobs, job);
+       if (unlikely(!job->source.count))
+               push(&kc->complete_jobs, job);
+       else
+               push(&kc->pages_jobs, job);
        wake(kc);
 }