xfs: open-code xfs_buf_item_dirty()
authorBrian Foster <bfoster@redhat.com>
Tue, 29 Aug 2017 17:08:36 +0000 (10:08 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Fri, 1 Sep 2017 17:55:30 +0000 (10:55 -0700)
It checks a single flag and has one caller. It probably isn't worth
its own function.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_buf_item.c
fs/xfs/xfs_buf_item.h
fs/xfs/xfs_trans_buf.c

index 573fc72c3f23b545d641d0ecb8d98eb2578ff712..cdae0ad5e0a5c0b1c748949a0ffe8772799e7508 100644 (file)
@@ -945,17 +945,6 @@ xfs_buf_item_log(
 }
 
 
-/*
- * Return 1 if the buffer has been logged or ordered in a transaction (at any
- * point, not just the current transaction) and 0 if not.
- */
-uint
-xfs_buf_item_dirty(
-       xfs_buf_log_item_t      *bip)
-{
-       return (bip->bli_flags & XFS_BLI_DIRTY);
-}
-
 STATIC void
 xfs_buf_item_free(
        xfs_buf_log_item_t      *bip)
index 530686e1afb94307f7a250aeacc9e31e5b8a49f7..e0e744aefaa85e28eb653ddf640eda556291eb7d 100644 (file)
@@ -64,7 +64,6 @@ typedef struct xfs_buf_log_item {
 int    xfs_buf_item_init(struct xfs_buf *, struct xfs_mount *);
 void   xfs_buf_item_relse(struct xfs_buf *);
 void   xfs_buf_item_log(xfs_buf_log_item_t *, uint, uint);
-uint   xfs_buf_item_dirty(xfs_buf_log_item_t *);
 void   xfs_buf_attach_iodone(struct xfs_buf *,
                              void(*)(struct xfs_buf *, xfs_log_item_t *),
                              xfs_log_item_t *);
index 86987d823d764415e938ac0fad77e90a4e97bfb3..cac8abbeca3f2830cadb9bb857ea8bf6bd789b54 100644 (file)
@@ -435,7 +435,7 @@ xfs_trans_brelse(xfs_trans_t        *tp,
        if (XFS_FORCED_SHUTDOWN(tp->t_mountp) && freed) {
                xfs_trans_ail_remove(&bip->bli_item, SHUTDOWN_LOG_IO_ERROR);
                xfs_buf_item_relse(bp);
-       } else if (!xfs_buf_item_dirty(bip)) {
+       } else if (!(bip->bli_flags & XFS_BLI_DIRTY)) {
 /***
                ASSERT(bp->b_pincount == 0);
 ***/