diff options
author | Brian Foster <bfoster@redhat.com> | 2021-01-27 04:14:55 +0100 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-02-01 18:44:23 +0100 |
commit | 4533fc631547213bd03fbdf0a96dd8eb6807d3a7 (patch) | |
tree | 41974de1d373f48ab7e53555b0889c9191a83cc8 /fs/xfs | |
parent | xfs: reduce ilock acquisitions in xfs_file_fsync (diff) | |
download | linux-4533fc631547213bd03fbdf0a96dd8eb6807d3a7.tar.xz linux-4533fc631547213bd03fbdf0a96dd8eb6807d3a7.zip |
xfs: fix unused log variable in xfs_log_cover()
The log variable is only used in kernels with asserts enabled.
Remove it and open code the dereference to avoid unused variable
warnings.
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_log.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 58699881c100..d8b814227734 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -1108,12 +1108,11 @@ static int xfs_log_cover( struct xfs_mount *mp) { - struct xlog *log = mp->m_log; int error = 0; bool need_covered; - ASSERT((xlog_cil_empty(log) && xlog_iclogs_empty(log) && - !xfs_ail_min_lsn(log->l_ailp)) || + ASSERT((xlog_cil_empty(mp->m_log) && xlog_iclogs_empty(mp->m_log) && + !xfs_ail_min_lsn(mp->m_log->l_ailp)) || XFS_FORCED_SHUTDOWN(mp)); if (!xfs_log_writable(mp)) |