diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-08-01 07:40:48 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-08-01 07:40:48 -0700 |
commit | 0c60d3aa0e2d007e7f79c96c118da25f594afe02 (patch) | |
tree | 7cbb2e92dcdfa9119f9a982ca5d0e7e8e51af868 /fs/xfs/libxfs | |
parent | ff23f4af7efd86cbb1bda42fe2171e0790f9cb5a (diff) | |
download | blackbird-obmc-linux-0c60d3aa0e2d007e7f79c96c118da25f594afe02.tar.gz blackbird-obmc-linux-0c60d3aa0e2d007e7f79c96c118da25f594afe02.zip |
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 <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs')
-rw-r--r-- | fs/xfs/libxfs/xfs_attr_leaf.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_attr_leaf.c b/fs/xfs/libxfs/xfs_attr_leaf.c index 4e7ef79a83c7..6fc5425b1474 100644 --- a/fs/xfs/libxfs/xfs_attr_leaf.c +++ b/fs/xfs/libxfs/xfs_attr_leaf.c @@ -242,7 +242,6 @@ xfs_attr3_leaf_verify( struct xfs_attr3_icleaf_hdr ichdr; struct xfs_mount *mp = bp->b_target->bt_mount; struct xfs_attr_leafblock *leaf = bp->b_addr; - struct xfs_perag *pag = bp->b_pag; struct xfs_attr_leaf_entry *entries; uint16_t end; int i; @@ -270,7 +269,7 @@ xfs_attr3_leaf_verify( * because we may have transitioned an empty shortform attr to a leaf * if the attr didn't fit in shortform. */ - if (pag && pag->pagf_init && ichdr.count == 0) + if (!xfs_log_in_recovery(mp) && ichdr.count == 0) return __this_address; /* |