diff options
author | Tyson Nottingham <tgnottingham@gmail.com> | 2018-03-30 06:56:10 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2018-03-30 06:56:10 +0200 |
commit | 27f394a7718d00ad16c59c616638cb46c6cd6a9d (patch) | |
tree | d211b746980f21a0cdc9775d1a82633963dfc9a4 /fs/ext4 | |
parent | ext4: omit init_itable=n in procfs when disabled (diff) | |
download | linux-27f394a7718d00ad16c59c616638cb46c6cd6a9d.tar.xz linux-27f394a7718d00ad16c59c616638cb46c6cd6a9d.zip |
ext4: don't show data=<mode> option if defaulted
Previously, mount -l would show data=<mode> even if the ext4 default
journaling mode was being used. Change this to be consistent with the
rest of the options.
Ext4 already did the right thing when the journaling mode being used
matched the one specified in the superblock's default mount options. The
reason it failed to do the right thing for the ext4 defaults is that,
when set, they were never included in sbi->s_def_mount_opt (unlike the
superblock's defaults, which were).
Signed-off-by: Tyson Nottingham <tgnottingham@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/super.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 20d5233856c5..185f7e61f4cf 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -4112,10 +4112,13 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) * cope, else JOURNAL_DATA */ if (jbd2_journal_check_available_features - (sbi->s_journal, 0, 0, JBD2_FEATURE_INCOMPAT_REVOKE)) + (sbi->s_journal, 0, 0, JBD2_FEATURE_INCOMPAT_REVOKE)) { set_opt(sb, ORDERED_DATA); - else + sbi->s_def_mount_opt |= EXT4_MOUNT_ORDERED_DATA; + } else { set_opt(sb, JOURNAL_DATA); + sbi->s_def_mount_opt |= EXT4_MOUNT_JOURNAL_DATA; + } break; case EXT4_MOUNT_ORDERED_DATA: |