From: Brian Foster Date: Fri, 27 Oct 2017 16:20:28 +0000 (-0700) Subject: xfs: fix unused variable warning in xfs_buf_set_ref() X-Git-Tag: v4.19~2220^2~51 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4eadcf9a417a4689e596e3c2a99857c2e3603049;p=platform%2Fkernel%2Flinux-rpi.git 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 Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index d481dd2..db786bc 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);