Merge branch 'xfs-misc-fixes-for-4.5-3' into for-next
[cascardo/linux.git] / fs / xfs / xfs_buf.c
index cbddb91..e143c7b 100644 (file)
@@ -604,6 +604,13 @@ found:
                }
        }
 
+       /*
+        * Clear b_error if this is a lookup from a caller that doesn't expect
+        * valid data to be found in the buffer.
+        */
+       if (!(flags & XBF_READ))
+               xfs_buf_ioerror(bp, 0);
+
        XFS_STATS_INC(target->bt_mount, xb_get);
        trace_xfs_buf_get(bp, flags, _RET_IP_);
        return bp;
@@ -1045,7 +1052,7 @@ xfs_buf_ioend_work(
        xfs_buf_ioend(bp);
 }
 
-void
+static void
 xfs_buf_ioend_async(
        struct xfs_buf  *bp)
 {