1 ext4: reject journal options for ext2 mounts
3 From: Carlos Maiolino <cmaiolino@redhat.com>
5 There is no reason to allow ext2 filesystems be mounted with journal
6 mount options. So, this patch adds them to the MOPT_NO_EXT2 mount
9 Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
10 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
12 fs/ext4/super.c | 6 +++---
13 1 file changed, 3 insertions(+), 3 deletions(-)
15 diff --git a/fs/ext4/super.c b/fs/ext4/super.c
16 index f06d058..e4b1141 100644
19 @@ -1366,9 +1366,9 @@ static const struct mount_opts {
20 {Opt_stripe, 0, MOPT_GTE0},
21 {Opt_resuid, 0, MOPT_GTE0},
22 {Opt_resgid, 0, MOPT_GTE0},
23 - {Opt_journal_dev, 0, MOPT_GTE0},
24 - {Opt_journal_path, 0, MOPT_STRING},
25 - {Opt_journal_ioprio, 0, MOPT_GTE0},
26 + {Opt_journal_dev, 0, MOPT_NO_EXT2 | MOPT_GTE0},
27 + {Opt_journal_path, 0, MOPT_NO_EXT2 | MOPT_STRING},
28 + {Opt_journal_ioprio, 0, MOPT_NO_EXT2 | MOPT_GTE0},
29 {Opt_data_journal, EXT4_MOUNT_JOURNAL_DATA, MOPT_NO_EXT2 | MOPT_DATAJ},
30 {Opt_data_ordered, EXT4_MOUNT_ORDERED_DATA, MOPT_NO_EXT2 | MOPT_DATAJ},
31 {Opt_data_writeback, EXT4_MOUNT_WRITEBACK_DATA,
36 To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
37 the body of a message to majordomo@vger.kernel.org
38 More majordomo info at http://vger.kernel.org/majordomo-info.html