From cd339cdd6fb774e549e98b548ac1be15aa40e80a Mon Sep 17 00:00:00 2001 From: Dave Chinner Date: Tue, 12 Mar 2013 23:30:34 +1100 Subject: [PATCH] --- yaml --- r: 371042 b: refs/heads/master c: c163f9a1760229a95d04e37b332de7d5c1c225cd h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/xfs/xfs_buf.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index e0402ac238e5..1dea66419dca 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d8ddfe81c7e4fe41b8ec342cc288d58aecdf7c47 +refs/heads/master: c163f9a1760229a95d04e37b332de7d5c1c225cd diff --git a/trunk/fs/xfs/xfs_buf.c b/trunk/fs/xfs/xfs_buf.c index 50eb603e0cc1..82b70bda9f47 100644 --- a/trunk/fs/xfs/xfs_buf.c +++ b/trunk/fs/xfs/xfs_buf.c @@ -1336,6 +1336,12 @@ _xfs_buf_ioapply( int size; int i; + /* + * Make sure we capture only current IO errors rather than stale errors + * left over from previous use of the buffer (e.g. failed readahead). + */ + bp->b_error = 0; + if (bp->b_flags & XBF_WRITE) { if (bp->b_flags & XBF_SYNCIO) rw = WRITE_SYNC;