diff options
Diffstat (limited to 'fs/xfs/xfs_buf.c')
-rw-r--r-- | fs/xfs/xfs_buf.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 4e8f0df82d02..8459b5d8cb71 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c | |||
@@ -1334,6 +1334,12 @@ _xfs_buf_ioapply( | |||
1334 | int size; | 1334 | int size; |
1335 | int i; | 1335 | int i; |
1336 | 1336 | ||
1337 | /* | ||
1338 | * Make sure we capture only current IO errors rather than stale errors | ||
1339 | * left over from previous use of the buffer (e.g. failed readahead). | ||
1340 | */ | ||
1341 | bp->b_error = 0; | ||
1342 | |||
1337 | if (bp->b_flags & XBF_WRITE) { | 1343 | if (bp->b_flags & XBF_WRITE) { |
1338 | if (bp->b_flags & XBF_SYNCIO) | 1344 | if (bp->b_flags & XBF_SYNCIO) |
1339 | rw = WRITE_SYNC; | 1345 | rw = WRITE_SYNC; |