diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2014-10-30 10:53:16 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2014-10-30 10:53:16 -0400 |
commit | 6b992ff25658367089db4a82666e232b65d55eae (patch) | |
tree | 63b2916871a586d14d7211a72fb20b4f7fe82abd /fs/ext4 | |
parent | 98c1a7593fa355fda7f5a5940c8bf5326ca964ba (diff) |
ext4: disallow changing journal_csum option during remount
ext4 does not permit changing the metadata or journal checksum feature
flag while mounted. Until we decide to support that, don't allow a
remount to change the journal_csum flag (right now we silently fail to
change anything).
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/super.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 5c11e2153e36..96059e0ef165 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -4845,6 +4845,14 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) goto restore_opts; } + if ((old_opts.s_mount_opt & EXT4_MOUNT_JOURNAL_CHECKSUM) ^ + test_opt(sb, JOURNAL_CHECKSUM)) { + ext4_msg(sb, KERN_ERR, "changing journal_checksum " + "during remount not supported"); + err = -EINVAL; + goto restore_opts; + } + if (test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA) { if (test_opt2(sb, EXPLICIT_DELALLOC)) { ext4_msg(sb, KERN_ERR, "can't mount with " |