From 6920539ac2c42d8477d87273e2e0488ddf42e303 Mon Sep 17 00:00:00 2001 From: Dave Chinner Date: Tue, 12 Mar 2013 23:30:34 +1100 Subject: [PATCH] --- yaml --- r: 361501 b: refs/heads/master c: e001873853d87674dd5b3cfa2851885023616695 h: refs/heads/master i: 361499: f8acb7a80c3cdb765a81d8582c5e0bc84293e21e 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 7c6f7d6aeb66..2f83a4ee3711 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3325beed46d8d14d873e94d89ea57ee900dec942 +refs/heads/master: e001873853d87674dd5b3cfa2851885023616695 diff --git a/trunk/fs/xfs/xfs_buf.c b/trunk/fs/xfs/xfs_buf.c index 4e8f0df82d02..8459b5d8cb71 100644 --- a/trunk/fs/xfs/xfs_buf.c +++ b/trunk/fs/xfs/xfs_buf.c @@ -1334,6 +1334,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;