xfs: remove XFS_BUF_ZEROFLAGS macro
authorDave Chinner <dchinner@redhat.com>
Wed, 10 Feb 2016 04:01:30 +0000 (15:01 +1100)
committerDave Chinner <david@fromorbit.com>
Wed, 10 Feb 2016 04:01:30 +0000 (15:01 +1100)
The places where we use this macro already clear unnecessary IO
flags (e.g. through xfs_bwrite()) or never have unexpected IO flags
set on them in the first place (e.g. iclog buffers). Remove the
macro from these locations, and where necessary clear only the
specific flags that are conditional in the current buffer context.

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_log.c
fs/xfs/xfs_log_recover.c

index 98b7ee97aeae04aa279fd5d6959226b92976f8d1..4eb89bd4ee73b6f4265eb63b8238e9571150bf26 100644 (file)
@@ -313,12 +313,6 @@ extern int xfs_buf_delwri_submit_nowait(struct list_head *);
 extern int xfs_buf_init(void);
 extern void xfs_buf_terminate(void);
 
-#define XFS_BUF_ZEROFLAGS(bp) \
-       ((bp)->b_flags &= ~(XBF_READ|XBF_WRITE|XBF_ASYNC| \
-                           XBF_SYNCIO|XBF_FUA|XBF_FLUSH| \
-                           XBF_WRITE_FAIL))
-
-
 /*
  * These macros use the IO block map rather than b_bn. b_bn is now really
  * just for the buffer cache index for cached buffers. As IO does not use b_bn
index edf20b20423597b527629ffa38a59dcbb557ffb4..40b700d3f42638537cf90f7020dbb3d5affd2347 100644 (file)
@@ -1864,7 +1864,7 @@ xlog_sync(
 
        bp->b_io_length = BTOBB(count);
        bp->b_fspriv = iclog;
-       XFS_BUF_ZEROFLAGS(bp);
+       bp->b_flags &= ~(XBF_FUA | XBF_FLUSH);
        bp->b_flags |= (XBF_ASYNC | XBF_SYNCIO | XBF_WRITE);
 
        if (log->l_mp->m_flags & XFS_MOUNT_BARRIER) {
@@ -1908,7 +1908,7 @@ xlog_sync(
                xfs_buf_associate_memory(bp,
                                (char *)&iclog->ic_header + count, split);
                bp->b_fspriv = iclog;
-               XFS_BUF_ZEROFLAGS(bp);
+               bp->b_flags &= ~(XBF_FUA | XBF_FLUSH);
                bp->b_flags |= (XBF_ASYNC | XBF_SYNCIO | XBF_WRITE);
                if (log->l_mp->m_flags & XFS_MOUNT_BARRIER)
                        bp->b_flags |= XBF_FUA;
index 50a75ecf279e55816b32af72860974832dafc785..837e8d09aa5a3bc4d969fc9988998ead4d9cd3af 100644 (file)
@@ -275,7 +275,6 @@ xlog_bwrite(
        ASSERT(nbblks <= bp->b_length);
 
        XFS_BUF_SET_ADDR(bp, log->l_logBBstart + blk_no);
-       XFS_BUF_ZEROFLAGS(bp);
        xfs_buf_hold(bp);
        xfs_buf_lock(bp);
        bp->b_io_length = nbblks;
This page took 0.035653 seconds and 5 git commands to generate.