提交 4eadcf9a 编写于 作者: B Brian Foster 提交者: Darrick J. Wong

xfs: fix unused variable warning in xfs_buf_set_ref()

Fix an unused variable warning on non-DEBUG builds introduced by
commit 7561d27e ("xfs: buffer lru reference count error injection
tag").
Signed-off-by: NBrian Foster <bfoster@redhat.com>
Reviewed-by: NDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: NDarrick J. Wong <darrick.wong@oracle.com>
上级 2fdbec5c
...@@ -2133,14 +2133,13 @@ xfs_buf_terminate(void) ...@@ -2133,14 +2133,13 @@ xfs_buf_terminate(void)
void xfs_buf_set_ref(struct xfs_buf *bp, int lru_ref) 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. * Set the lru reference count to 0 based on the error injection tag.
* This allows userspace to disrupt buffer caching for debug/testing * This allows userspace to disrupt buffer caching for debug/testing
* purposes. * 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; lru_ref = 0;
atomic_set(&bp->b_lru_ref, lru_ref); atomic_set(&bp->b_lru_ref, lru_ref);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册