diff options
Diffstat (limited to 'fs/xfs/xfs_aops.c')
-rw-r--r-- | fs/xfs/xfs_aops.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index 09af0f7cd55e..76b6f988e2fa 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c | |||
@@ -276,7 +276,7 @@ xfs_end_io( | |||
276 | struct xfs_inode *ip = XFS_I(ioend->io_inode); | 276 | struct xfs_inode *ip = XFS_I(ioend->io_inode); |
277 | xfs_off_t offset = ioend->io_offset; | 277 | xfs_off_t offset = ioend->io_offset; |
278 | size_t size = ioend->io_size; | 278 | size_t size = ioend->io_size; |
279 | int error = ioend->io_bio->bi_error; | 279 | int error; |
280 | 280 | ||
281 | /* | 281 | /* |
282 | * Just clean up the in-memory strutures if the fs has been shut down. | 282 | * Just clean up the in-memory strutures if the fs has been shut down. |
@@ -289,6 +289,7 @@ xfs_end_io( | |||
289 | /* | 289 | /* |
290 | * Clean up any COW blocks on an I/O error. | 290 | * Clean up any COW blocks on an I/O error. |
291 | */ | 291 | */ |
292 | error = blk_status_to_errno(ioend->io_bio->bi_status); | ||
292 | if (unlikely(error)) { | 293 | if (unlikely(error)) { |
293 | switch (ioend->io_type) { | 294 | switch (ioend->io_type) { |
294 | case XFS_IO_COW: | 295 | case XFS_IO_COW: |
@@ -332,7 +333,7 @@ xfs_end_bio( | |||
332 | else if (ioend->io_append_trans) | 333 | else if (ioend->io_append_trans) |
333 | queue_work(mp->m_data_workqueue, &ioend->io_work); | 334 | queue_work(mp->m_data_workqueue, &ioend->io_work); |
334 | else | 335 | else |
335 | xfs_destroy_ioend(ioend, bio->bi_error); | 336 | xfs_destroy_ioend(ioend, blk_status_to_errno(bio->bi_status)); |
336 | } | 337 | } |
337 | 338 | ||
338 | STATIC int | 339 | STATIC int |
@@ -500,7 +501,7 @@ xfs_submit_ioend( | |||
500 | * time. | 501 | * time. |
501 | */ | 502 | */ |
502 | if (status) { | 503 | if (status) { |
503 | ioend->io_bio->bi_error = status; | 504 | ioend->io_bio->bi_status = errno_to_blk_status(status); |
504 | bio_endio(ioend->io_bio); | 505 | bio_endio(ioend->io_bio); |
505 | return status; | 506 | return status; |
506 | } | 507 | } |