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_ialloc.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_ialloc.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_ialloc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_ialloc.c b/fs/xfs/libxfs/xfs_ialloc.c index 54deb2d12ac6..70c1db99f6a7 100644 --- a/fs/xfs/libxfs/xfs_ialloc.c +++ b/fs/xfs/libxfs/xfs_ialloc.c @@ -38,6 +38,7 @@ #include "xfs_icreate_item.h" #include "xfs_icache.h" #include "xfs_trace.h" +#include "xfs_log.h" /* @@ -2500,9 +2501,14 @@ xfs_agi_verify( struct xfs_mount *mp = bp->b_target->bt_mount; struct xfs_agi *agi = XFS_BUF_TO_AGI(bp); - if (xfs_sb_version_hascrc(&mp->m_sb) && - !uuid_equal(&agi->agi_uuid, &mp->m_sb.sb_meta_uuid)) + if (xfs_sb_version_hascrc(&mp->m_sb)) { + if (!uuid_equal(&agi->agi_uuid, &mp->m_sb.sb_meta_uuid)) + return false; + if (!xfs_log_check_lsn(mp, + be64_to_cpu(XFS_BUF_TO_AGI(bp)->agi_lsn))) return false; + } + /* * Validate the magic number of the agi block. */ |