xfs: exclude never-released buffers from buftarg I/O accounting
[cascardo/linux.git] / fs / xfs / xfs_buf.c
index 5d52e44..c0bd5e0 100644 (file)
@@ -815,7 +815,8 @@ xfs_buf_get_uncached(
        struct xfs_buf          *bp;
        DEFINE_SINGLE_BUF_MAP(map, XFS_BUF_DADDR_NULL, numblks);
 
-       bp = _xfs_buf_alloc(target, &map, 1, 0);
+       /* flags might contain irrelevant bits, pass only what we care about */
+       bp = _xfs_buf_alloc(target, &map, 1, flags & XBF_NO_IOACCT);
        if (unlikely(bp == NULL))
                goto fail;