]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
xfs: tone down writepage/releasepage WARN_ONs
authorChristoph Hellwig <hch@infradead.org>
Fri, 6 Jun 2014 06:05:15 +0000 (16:05 +1000)
committerDave Chinner <david@fromorbit.com>
Fri, 6 Jun 2014 06:05:15 +0000 (16:05 +1000)
I recently ran into the issue fixed by

  "xfs: kill buffers over failed write ranges properly"

which spams the log with lots of backtraces.  Make debugging any
issues like that easier by using WARN_ON_ONCE in the writeback code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_aops.c

index 0479c32c5eb1703ba0081f21af9b380e5a3c95cb..ce0c5ca0a8a32556ba2c086e1d4fd9420af8b98d 100644 (file)
@@ -975,7 +975,7 @@ xfs_vm_writepage(
         * Given that we do not allow direct reclaim to call us, we should
         * never be called while in a filesystem transaction.
         */
-       if (WARN_ON(current->flags & PF_FSTRANS))
+       if (WARN_ON_ONCE(current->flags & PF_FSTRANS))
                goto redirty;
 
        /* Is this page beyond the end of the file? */
@@ -1188,9 +1188,9 @@ xfs_vm_releasepage(
 
        xfs_count_page_state(page, &delalloc, &unwritten);
 
-       if (WARN_ON(delalloc))
+       if (WARN_ON_ONCE(delalloc))
                return 0;
-       if (WARN_ON(unwritten))
+       if (WARN_ON_ONCE(unwritten))
                return 0;
 
        return try_to_free_buffers(page);