xfs: Remove the macro XFS_BUF_TARGET
authorChandra Seetharaman <sekharan@us.ibm.com>
Fri, 22 Jul 2011 23:40:40 +0000 (23:40 +0000)
committerAlex Elder <aelder@sgi.com>
Mon, 25 Jul 2011 20:03:31 +0000 (15:03 -0500)
Remove the definition and usages of the macro XFS_BUF_TARGET

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
fs/xfs/linux-2.6/xfs_buf.h
fs/xfs/xfs_buf_item.c
fs/xfs/xfs_mount.c
fs/xfs/xfs_rw.c
fs/xfs/xfs_trans_buf.c

index 6a38b2d21ea006fafb7c0a59ea6d3b9e847bf667..4b304990a7993870d74ffccb1fc62b0488d44dec 100644 (file)
@@ -292,7 +292,6 @@ static inline int xfs_buf_ispinned(struct xfs_buf *bp)
 
 #define XFS_BUF_FINISH_IOWAIT(bp)      complete(&bp->b_iowait);
 
-#define XFS_BUF_TARGET(bp)             ((bp)->b_target)
 #define XFS_BUFTARG_NAME(target)       xfs_buf_target_name(target)
 
 static inline void xfs_buf_relse(xfs_buf_t *bp)
index a3d2bbca26c731816e0727c0131e6ac16098d7af..5c2b5549e14e97c9ae8eca8b84c2f76c7532fb04 100644 (file)
@@ -971,14 +971,14 @@ xfs_buf_iodone_callbacks(
                goto do_callbacks;
        }
 
-       if (XFS_BUF_TARGET(bp) != lasttarg ||
+       if (bp->b_target != lasttarg ||
            time_after(jiffies, (lasttime + 5*HZ))) {
                lasttime = jiffies;
                xfs_alert(mp, "Device %s: metadata write error block 0x%llx",
-                       XFS_BUFTARG_NAME(XFS_BUF_TARGET(bp)),
+                       XFS_BUFTARG_NAME(bp->b_target),
                      (__uint64_t)XFS_BUF_ADDR(bp));
        }
-       lasttarg = XFS_BUF_TARGET(bp);
+       lasttarg = bp->b_target;
 
        /*
         * If the write was asynchronous then no one will be looking for the
index b00c808d7d3e97b2123d6993b01e566f34e73f61..49ecc170f7499ee157561163f8a350c6f601227a 100644 (file)
@@ -1615,7 +1615,7 @@ xfs_unmountfs_writesb(xfs_mount_t *mp)
                XFS_BUF_UNDELAYWRITE(sbp);
                XFS_BUF_WRITE(sbp);
                XFS_BUF_UNASYNC(sbp);
-               ASSERT(XFS_BUF_TARGET(sbp) == mp->m_ddev_targp);
+               ASSERT(sbp->b_target == mp->m_ddev_targp);
                xfsbdstrat(mp, sbp);
                error = xfs_buf_iowait(sbp);
                if (error)
index d1f76f8a4c7ef8156707b3853c88d9c38d8d8802..7382bfe40fbdfa8500a779a9324f30ba2c2f3eff 100644 (file)
@@ -104,7 +104,7 @@ xfs_ioerror_alert(
        xfs_alert(mp,
                 "I/O error occurred: meta-data dev %s block 0x%llx"
                 "       (\"%s\") error %d buf count %zd",
-               XFS_BUFTARG_NAME(XFS_BUF_TARGET(bp)),
+               XFS_BUFTARG_NAME(bp->b_target),
                (__uint64_t)blkno, func,
                bp->b_error, XFS_BUF_COUNT(bp));
 }
index 7dd62e26ce9229c887d74478b59104d86b7ad711..137e2b9e2948ae29c41eb07867c5ea813f19bdea 100644 (file)
@@ -54,7 +54,7 @@ xfs_trans_buf_item_match(
        list_for_each_entry(lidp, &tp->t_items, lid_trans) {
                blip = (struct xfs_buf_log_item *)lidp->lid_item;
                if (blip->bli_item.li_type == XFS_LI_BUF &&
-                   XFS_BUF_TARGET(blip->bli_buf) == target &&
+                   blip->bli_buf->b_target == target &&
                    XFS_BUF_ADDR(blip->bli_buf) == blkno &&
                    XFS_BUF_COUNT(blip->bli_buf) == len)
                        return blip->bli_buf;