aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_buf.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_buf.c')
-rw-r--r--fs/xfs/xfs_buf.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index 62fa39276a24..15c7a484a5d2 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -1213,8 +1213,11 @@ xfs_buf_bio_end_io(
1213 * don't overwrite existing errors - otherwise we can lose errors on 1213 * don't overwrite existing errors - otherwise we can lose errors on
1214 * buffers that require multiple bios to complete. 1214 * buffers that require multiple bios to complete.
1215 */ 1215 */
1216 if (bio->bi_error) 1216 if (bio->bi_status) {
1217 cmpxchg(&bp->b_io_error, 0, bio->bi_error); 1217 int error = blk_status_to_errno(bio->bi_status);
1218
1219 cmpxchg(&bp->b_io_error, 0, error);
1220 }
1218 1221
1219 if (!bp->b_error && xfs_buf_is_vmapped(bp) && (bp->b_flags & XBF_READ)) 1222 if (!bp->b_error && xfs_buf_is_vmapped(bp) && (bp->b_flags & XBF_READ))
1220 invalidate_kernel_vmap_range(bp->b_addr, xfs_buf_vmap_len(bp)); 1223 invalidate_kernel_vmap_range(bp->b_addr, xfs_buf_vmap_len(bp));