Skip to content

Commit c85b0b1

Browse files
committed
Merge tag 'for-4.16/dm-chained-bios-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm
Pull device mapper fix from Mike Snitzer: "Fix for DM core to properly propagate errors (avoids overriding non-zero error with 0). This is particularly important given DM core's increased use of chained bios" * tag 'for-4.16/dm-chained-bios-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm: correctly handle chained bios in dec_pending()
2 parents 5e8639b + 8dd601f commit c85b0b1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/md/dm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,8 @@ static void dec_pending(struct dm_io *io, blk_status_t error)
903903
queue_io(md, bio);
904904
} else {
905905
/* done with normal IO or empty flush */
906-
bio->bi_status = io_error;
906+
if (io_error)
907+
bio->bi_status = io_error;
907908
bio_endio(bio);
908909
}
909910
}

0 commit comments

Comments
 (0)