xfs: remove XBF_ASYNC flag wrapper macros
authorDave Chinner <dchinner@redhat.com>
Wed, 10 Feb 2016 04:01:11 +0000 (15:01 +1100)
committerDave Chinner <david@fromorbit.com>
Wed, 10 Feb 2016 04:01:11 +0000 (15:01 +1100)
They only set/clear/check a flag, no need for obfuscating this
with a macro.

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

index 03b5d3a61b0e0503981ebb6b82614034f888eaa4..2a28d1ccbfb936b009a51ab939cb4f6335f6b3a7 100644 (file)
@@ -321,10 +321,6 @@ void xfs_buf_stale(struct xfs_buf *bp);
 #define XFS_BUF_UNSTALE(bp)    ((bp)->b_flags &= ~XBF_STALE)
 #define XFS_BUF_ISSTALE(bp)    ((bp)->b_flags & XBF_STALE)
 
-#define XFS_BUF_ASYNC(bp)      ((bp)->b_flags |= XBF_ASYNC)
-#define XFS_BUF_UNASYNC(bp)    ((bp)->b_flags &= ~XBF_ASYNC)
-#define XFS_BUF_ISASYNC(bp)    ((bp)->b_flags & XBF_ASYNC)
-
 #define XFS_BUF_READ(bp)       ((bp)->b_flags |= XBF_READ)
 #define XFS_BUF_UNREAD(bp)     ((bp)->b_flags &= ~XBF_READ)
 #define XFS_BUF_ISREAD(bp)     ((bp)->b_flags & XBF_READ)
index 901e4d721958a63a2277848f9edfa5a51655db49..838df068fad463d8f78dd7e7705677df7b9f0acf 100644 (file)
@@ -1090,7 +1090,7 @@ xfs_buf_iodone_callbacks(
         * errors tend to affect the whole device and a failing log write
         * will make us give up.  But we really ought to do better here.
         */
-       if (XFS_BUF_ISASYNC(bp)) {
+       if (bp->b_flags & XBF_ASYNC) {
                ASSERT(bp->b_iodone != NULL);
 
                trace_xfs_buf_item_iodone_async(bp, _RET_IP_);
index aa8c9bfaa35d642e5d928533394c5b67b5a045c1..19db3daad8a9081b9ba9f62db7e3acad305d5121 100644 (file)
@@ -1212,7 +1212,7 @@ xlog_iodone(xfs_buf_t *bp)
        }
 
        /* log I/O is always issued ASYNC */
-       ASSERT(XFS_BUF_ISASYNC(bp));
+       ASSERT(bp->b_flags & XBF_ASYNC);
        xlog_state_done_syncing(iclog, aborted);
 
        /*
@@ -1865,8 +1865,7 @@ xlog_sync(
        bp->b_io_length = BTOBB(count);
        bp->b_fspriv = iclog;
        XFS_BUF_ZEROFLAGS(bp);
-       XFS_BUF_ASYNC(bp);
-       bp->b_flags |= XBF_SYNCIO;
+       bp->b_flags |= (XBF_ASYNC | XBF_SYNCIO);
 
        if (log->l_mp->m_flags & XFS_MOUNT_BARRIER) {
                bp->b_flags |= XBF_FUA;
@@ -1911,8 +1910,7 @@ xlog_sync(
                                (char *)&iclog->ic_header + count, split);
                bp->b_fspriv = iclog;
                XFS_BUF_ZEROFLAGS(bp);
-               XFS_BUF_ASYNC(bp);
-               bp->b_flags |= XBF_SYNCIO;
+               bp->b_flags |= (XBF_ASYNC | XBF_SYNCIO);
                if (log->l_mp->m_flags & XFS_MOUNT_BARRIER)
                        bp->b_flags |= XBF_FUA;
 
index 545ff3c03243e1275bf0fcf5f9c944a18a5e6624..f00cce9bf830fa1e987c59a17c9d5943034345fa 100644 (file)
@@ -4926,10 +4926,9 @@ xlog_do_recover(
         * updates, re-read in the superblock and reverify it.
         */
        bp = xfs_getsb(log->l_mp, 0);
-       bp->b_flags &= ~XBF_DONE;
+       bp->b_flags &= ~(XBF_DONE | XBF_ASYNC);
        ASSERT(!(XFS_BUF_ISWRITE(bp)));
        XFS_BUF_READ(bp);
-       XFS_BUF_UNASYNC(bp);
        bp->b_ops = &xfs_sb_buf_ops;
 
        error = xfs_buf_submit_wait(bp);