diff --git a/drivers/md/md.c b/drivers/md/md.c index 9247e55c7eaf..2748b0b424cf 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -8669,7 +8669,8 @@ static void md_end_clone_io(struct bio *bio) struct bio *orig_bio = md_io_clone->orig_bio; struct mddev *mddev = md_io_clone->mddev; - orig_bio->bi_status = bio->bi_status; + if (bio->bi_status && !orig_bio->bi_status) + orig_bio->bi_status = bio->bi_status; if (md_io_clone->start_time) bio_end_io_acct(orig_bio, md_io_clone->start_time);