summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_sb.c
diff options
context:
space:
mode:
authorMike Marshall <hubcap@omnibond.com>2015-11-16 10:58:57 -0500
committerMike Marshall <hubcap@omnibond.com>2015-11-16 10:58:57 -0500
commita52079dad4718fa924ae81a939f8a665366f562b (patch)
treea9d6004f9bf1beff49cbfe0d5bf6edbf621b065d /fs/xfs/libxfs/xfs_sb.c
parent24c8d0804be00da90af9efa8eb404bd7a3284ba9 (diff)
parent8005c49d9aea74d382f474ce11afbbc7d7130bec (diff)
downloadop-kernel-dev-a52079dad4718fa924ae81a939f8a665366f562b.zip
op-kernel-dev-a52079dad4718fa924ae81a939f8a665366f562b.tar.gz
Orangefs: Merge tag 'v4.4-rc1' into for-next
Linux 4.4-rc1
Diffstat (limited to 'fs/xfs/libxfs/xfs_sb.c')
-rw-r--r--fs/xfs/libxfs/xfs_sb.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_sb.c b/fs/xfs/libxfs/xfs_sb.c
index 4742514..a0b071d 100644
--- a/fs/xfs/libxfs/xfs_sb.c
+++ b/fs/xfs/libxfs/xfs_sb.c
@@ -35,6 +35,7 @@
#include "xfs_bmap_btree.h"
#include "xfs_alloc_btree.h"
#include "xfs_ialloc_btree.h"
+#include "xfs_log.h"
/*
* Physical superblock buffer manipulations. Shared with libxfs in userspace.
@@ -163,6 +164,15 @@ xfs_mount_validate_sb(
"Filesystem can not be safely mounted by this kernel.");
return -EINVAL;
}
+ } else if (xfs_sb_version_hascrc(sbp)) {
+ /*
+ * We can't read verify the sb LSN because the read verifier is
+ * called before the log is allocated and processed. We know the
+ * log is set up before write verifier (!check_version) calls,
+ * so just check it here.
+ */
+ if (!xfs_log_check_lsn(mp, sbp->sb_lsn))
+ return -EFSCORRUPTED;
}
if (xfs_sb_version_has_pquotino(sbp)) {
OpenPOWER on IntegriCloud