aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-02-16 09:23:36 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2018-02-16 09:23:36 -0800
commitc85b0b14341c51d8b8962c0d90d71923cad3a218 (patch)
tree840dd0ef17519ca43c6c8379948c991e6db8e868
parent5e8639b73b7d2fcea71fd517ac7d86db136ddf1d (diff)
parent8dd601fa8317243be887458c49f6c29c2f3d719f (diff)
downloadlinux-stericsson-c85b0b14341c51d8b8962c0d90d71923cad3a218.tar.gz
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()
-rw-r--r--drivers/md/dm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index d6de00f367ef..68136806d365 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -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);
}
}