block: Generic bio chaining
[deliverable/linux.git] / drivers / md / dm-cache-target.c
index 86f9c83eb30c6d5f9f0ea987f1e6db377266e1be..bf3a206abd782722be3a17ca6f7469f66e4f9a94 100644 (file)
@@ -765,6 +765,12 @@ static void writethrough_endio(struct bio *bio, int err)
 
        dm_unhook_bio(&pb->hook_info, bio);
 
+       /*
+        * Must bump bi_remaining to allow bio to complete with
+        * restored bi_end_io.
+        */
+       atomic_inc(&bio->bi_remaining);
+
        if (err) {
                bio_endio(bio, err);
                return;
This page took 0.025754 seconds and 5 git commands to generate.