diff options
author | Dave Chinner <david@fromorbit.com> | 2015-10-12 10:37:58 +0300 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-10-12 10:37:58 +0300 |
commit | 316433beda9433697109eb1cd256666f163c7c1f (patch) | |
tree | 14dc948e98bf1d5a1bbbe86cffb7da9a2952325b /fs/xfs/libxfs/xfs_alloc.c | |
parent | 9e92054e8e049f8f4c64d2c6961b2a7e3e13977f (diff) | |
parent | 91f9f5fe1e7350e872b3fbc3194e8183bddce514 (diff) | |
download | linux-316433beda9433697109eb1cd256666f163c7c1f.tar.xz |
Merge branch 'xfs-logging-fixes' into for-next
Diffstat (limited to 'fs/xfs/libxfs/xfs_alloc.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_alloc.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c index 9b5da7e3b5c2..e926197e0620 100644 --- a/fs/xfs/libxfs/xfs_alloc.c +++ b/fs/xfs/libxfs/xfs_alloc.c @@ -482,7 +482,9 @@ xfs_agfl_verify( be32_to_cpu(agfl->agfl_bno[i]) >= mp->m_sb.sb_agblocks) return false; } - return true; + + return xfs_log_check_lsn(mp, + be64_to_cpu(XFS_BUF_TO_AGFL(bp)->agfl_lsn)); } static void @@ -2259,9 +2261,13 @@ xfs_agf_verify( { struct xfs_agf *agf = XFS_BUF_TO_AGF(bp); - if (xfs_sb_version_hascrc(&mp->m_sb) && - !uuid_equal(&agf->agf_uuid, &mp->m_sb.sb_meta_uuid)) + if (xfs_sb_version_hascrc(&mp->m_sb)) { + if (!uuid_equal(&agf->agf_uuid, &mp->m_sb.sb_meta_uuid)) return false; + if (!xfs_log_check_lsn(mp, + be64_to_cpu(XFS_BUF_TO_AGF(bp)->agf_lsn))) + return false; + } if (!(agf->agf_magicnum == cpu_to_be32(XFS_AGF_MAGIC) && XFS_AGF_GOOD_VERSION(be32_to_cpu(agf->agf_versionnum)) && |