summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/bcachefs/super.c')
-rw-r--r--fs/bcachefs/super.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c
index 7ecbc23af1a1..061a1518f28c 100644
--- a/fs/bcachefs/super.c
+++ b/fs/bcachefs/super.c
@@ -754,11 +754,11 @@ static struct bch_fs *bch2_fs_alloc(struct bch_sb *sb, struct bch_opts opts)
goto err;
/* Compat: */
- if (sb->version <= bcachefs_metadata_version_inode_v2 &&
+ if (le16_to_cpu(sb->version) <= bcachefs_metadata_version_inode_v2 &&
!BCH_SB_JOURNAL_FLUSH_DELAY(sb))
SET_BCH_SB_JOURNAL_FLUSH_DELAY(sb, 1000);
- if (sb->version <= bcachefs_metadata_version_inode_v2 &&
+ if (le16_to_cpu(sb->version) <= bcachefs_metadata_version_inode_v2 &&
!BCH_SB_JOURNAL_RECLAIM_DELAY(sb))
SET_BCH_SB_JOURNAL_RECLAIM_DELAY(sb, 100);
@@ -1999,7 +1999,7 @@ err:
BCH_DEBUG_PARAMS()
#undef BCH_DEBUG_PARAM
-unsigned bch2_metadata_version = bcachefs_metadata_version_current;
+static unsigned bch2_metadata_version = bcachefs_metadata_version_current;
module_param_named(version, bch2_metadata_version, uint, 0400);
module_exit(bcachefs_exit);