From 0c60d3aa0e2d007e7f79c96c118da25f594afe02 Mon Sep 17 00:00:00 2001 From: Darrick J. Wong Date: Wed, 1 Aug 2018 07:40:48 -0700 Subject: xfs: refactor log recovery check Add a predicate to decide if the log is actively in recovery and use that instead of open-coding a pagf_init check in the attr leaf verifier. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Reviewed-by: Carlos Maiolino --- fs/xfs/xfs_log.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'fs/xfs/xfs_log.c') diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index fd10b1426382..00df4f39093a 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c @@ -4104,3 +4104,12 @@ xfs_log_check_lsn( return valid; } + +bool +xfs_log_in_recovery( + struct xfs_mount *mp) +{ + struct xlog *log = mp->m_log; + + return log->l_flags & XLOG_ACTIVE_RECOVERY; +} -- cgit v1.2.3-55-g7522