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/xfs_log_recover.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/xfs_log_recover.c')
-rw-r--r-- | fs/xfs/xfs_log_recover.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 512a0945d52a..f8f1363dc045 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -4609,9 +4609,19 @@ xlog_recover( int error; /* find the tail of the log */ - if ((error = xlog_find_tail(log, &head_blk, &tail_blk))) + error = xlog_find_tail(log, &head_blk, &tail_blk); + if (error) return error; + /* + * The superblock was read before the log was available and thus the LSN + * could not be verified. Check the superblock LSN against the current + * LSN now that it's known. + */ + if (xfs_sb_version_hascrc(&log->l_mp->m_sb) && + !xfs_log_check_lsn(log->l_mp, log->l_mp->m_sb.sb_lsn)) + return -EINVAL; + if (tail_blk != head_blk) { /* There used to be a comment here: * |