diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index d481dd2b29a688db8475383b4e2d6a4cc6a45a65..db786bce7c03eaea062d9be5bdd05403f42592b0 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);