]> Pileus Git - ~andy/linux/blobdiff - fs/xfs/xfs_buf.c
Merge tag 'trace-fixes-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/rosted...
[~andy/linux] / fs / xfs / xfs_buf.c
index 8459b5d8cb71ceaa98ff64990cae8d4daaf6f1b1..82b70bda9f47a51eb3f31a50ae4fcd32f6c57047 100644 (file)
@@ -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)