block: don't unecessarily clobber bi_error for chained bios
authorChristoph Hellwig <hch@lst.de>
Fri, 11 Mar 2016 16:34:50 +0000 (17:34 +0100)
committerJens Axboe <axboe@fb.com>
Mon, 14 Mar 2016 14:55:21 +0000 (08:55 -0600)
commitaf3e3a5259e35d7056fbe568a0ffcbd1420e1742
treea6d55bcb5428401bc0d0b93f250eee620a7d3185
parent3684aa7099e0ab1038a1a1bf717ae60ffc3018d1
block: don't unecessarily clobber bi_error for chained bios

Only overwrite the parents bi_error if it was zero. That way a successful
bio completion doesn't reset the error pointer.

Reported-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/bio.c