From 3876bd13498237987df82fdf495cc050ec70c36a Mon Sep 17 00:00:00 2001 From: Dave Chinner Date: Wed, 27 Feb 2013 13:25:54 +1100 Subject: [PATCH] --- yaml --- r: 371038 b: refs/heads/master c: d5929de8337fef46f3e307914ed0f3cb845e66c1 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/xfs/xfs_buf.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index ee8bd915a36b..522532cbf139 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e8108cedb1c5d1dc359690d18ca997e97a0061d2 +refs/heads/master: d5929de8337fef46f3e307914ed0f3cb845e66c1 diff --git a/trunk/fs/xfs/xfs_buf.c b/trunk/fs/xfs/xfs_buf.c index 4e8f0df82d02..50eb603e0cc1 100644 --- a/trunk/fs/xfs/xfs_buf.c +++ b/trunk/fs/xfs/xfs_buf.c @@ -1022,7 +1022,9 @@ xfs_buf_iodone_work( bool read = !!(bp->b_flags & XBF_READ); bp->b_flags &= ~(XBF_READ | XBF_WRITE | XBF_READ_AHEAD); - if (read && bp->b_ops) + + /* only validate buffers that were read without errors */ + if (read && bp->b_ops && !bp->b_error && (bp->b_flags & XBF_DONE)) bp->b_ops->verify_read(bp); if (bp->b_iodone)