- Fix for a potential infinite loop which was introduced in 4d559a3bcb73
- Fix for the return type of xfs_iomap_eof_prealloc_initial_size
  from a1e16c26660b
- Fix for a failed buffer readahead causing subsequent callers to
  fail incorrectly
xfs: ensure we capture IO errors correctly

Failed buffer readahead can leave the buffer in the cache marked
with an error. Most callers that then issue a subsequent read on the
buffer do not zero the b_error field out, and so we may incorectly
detect an error during IO completion due to the stale error value
left on the buffer.

Avoid this problem by zeroing the error before IO submission. This
ensures that the only IO errors that are detected those captured
from are those captured from bio submission or completion.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>

(cherry picked from commit c163f9a1760229a95d04e37b332de7d5c1c225cd)
1 file changed