diff options
author | Christoph Hellwig <hch@lst.de> | 2017-06-03 03:38:06 -0400 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-06-09 11:27:32 -0400 |
commit | 4e4cbee93d56137ebff722be022cae5f70ef84fb (patch) | |
tree | 4fa7345155599fc6bdd653fca8c5224ddf90a5be /fs/xfs/xfs_buf.c | |
parent | fc17b6534eb8395f0b3133eb31d87deec32c642b (diff) |
block: switch bios to blk_status_t
Replace bi_error with a new bi_status to allow for a clear conversion.
Note that device mapper overloaded bi_error with a private value, which
we'll have to keep arround at least for now and thus propagate to a
proper blk_status_t value.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'fs/xfs/xfs_buf.c')
-rw-r--r-- | fs/xfs/xfs_buf.c | 7 |
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)); |