summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_buf.c
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2017-10-27 09:20:28 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2017-10-27 09:20:31 -0700
commit4eadcf9a417a4689e596e3c2a99857c2e3603049 (patch)
tree1103e5396889e9971950a2a3fa5984f48b394913 /fs/xfs/xfs_buf.c
parent2fdbec5cbeb93349836d682b1caa5cc72d1b7018 (diff)
downloadblackbird-op-linux-4eadcf9a417a4689e596e3c2a99857c2e3603049.tar.gz
blackbird-op-linux-4eadcf9a417a4689e596e3c2a99857c2e3603049.zip
xfs: fix unused variable warning in xfs_buf_set_ref()
Fix an unused variable warning on non-DEBUG builds introduced by commit 7561d27e90 ("xfs: buffer lru reference count error injection tag"). Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_buf.c')
-rw-r--r--fs/xfs/xfs_buf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index d481dd2b29a6..db786bce7c03 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -2133,14 +2133,13 @@ xfs_buf_terminate(void)
void xfs_buf_set_ref(struct xfs_buf *bp, int lru_ref)
{
- struct xfs_mount *mp = bp->b_target->bt_mount;
-
/*
* Set the lru reference count to 0 based on the error injection tag.
* This allows userspace to disrupt buffer caching for debug/testing
* purposes.
*/
- if (XFS_TEST_ERROR(false, mp, XFS_ERRTAG_BUF_LRU_REF))
+ if (XFS_TEST_ERROR(false, bp->b_target->bt_mount,
+ XFS_ERRTAG_BUF_LRU_REF))
lru_ref = 0;
atomic_set(&bp->b_lru_ref, lru_ref);
OpenPOWER on IntegriCloud