]> www.infradead.org Git - linux.git/commitdiff
xfs: fix unused log variable in xfs_log_cover()
authorBrian Foster <bfoster@redhat.com>
Wed, 27 Jan 2021 03:14:55 +0000 (19:14 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 1 Feb 2021 17:44:23 +0000 (09:44 -0800)
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>
fs/xfs/xfs_log.c

index 58699881c100edc26f74a802310a831752eef010..d8b814227734bac41445a582beb5d1c61d729cf6 100644 (file)
@@ -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))