Skip to content

Commit

Permalink
Merge tag 'for-4.16/dm-chained-bios-fix' of git://git.kernel.org/pub/…
Browse files Browse the repository at this point in the history
…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()
  • Loading branch information
torvalds committed Feb 16, 2018
2 parents 5e8639b + 8dd601f commit c85b0b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,8 @@ static void dec_pending(struct dm_io *io, blk_status_t error)
queue_io(md, bio);
} else {
/* done with normal IO or empty flush */
bio->bi_status = io_error;
if (io_error)
bio->bi_status = io_error;
bio_endio(bio);
}
}
Expand Down

0 comments on commit c85b0b1

Please sign in to comment.