Message ID | 20220330185551.3553196-1-christoph.boehmwalder@linbit.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [RESEND] drbd: fix potential silent data corruption | expand |
The change looks good, but this really should grow a proper Fixes tag.
On Wed, Mar 30, 2022 at 10:45:47PM -0700, Christoph Hellwig wrote: > The change looks good, but this really should grow a proper Fixes tag. > And for the resend fix the spelling of Jens' email address.
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index c04394518b07..e1e58e91ee58 100644 --- a/drivers/block/drbd/drbd_req.c +++ b/drivers/block/drbd/drbd_req.c @@ -180,7 +180,8 @@ void start_new_tl_epoch(struct drbd_connection *connection) void complete_master_bio(struct drbd_device *device, struct bio_and_error *m) { - m->bio->bi_status = errno_to_blk_status(m->error); + if (unlikely(m->error)) + m->bio->bi_status = errno_to_blk_status(m->error); bio_endio(m->bio); dec_ap_bio(device); }