From: Carlos Maiolino <cmaiolino@redhat.com>
To: linux-ext4@vger.kernel.org
Subject: [PATCH] ext4: Reject mount an ext2 filesystem with journal options
Date: Fri, 26 Jun 2015 13:03:29 -0300 [thread overview]
Message-ID: <1435334609-23192-1-git-send-email-cmaiolino@redhat.com> (raw)
There is no reason to allow ext2 filesystems be mounted with journal mount
options. So, this patch adds them to the MOPT_NO_EXT2 mount options list.
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
---
fs/ext4/super.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index f06d058..e4b1141 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1366,9 +1366,9 @@ static const struct mount_opts {
{Opt_stripe, 0, MOPT_GTE0},
{Opt_resuid, 0, MOPT_GTE0},
{Opt_resgid, 0, MOPT_GTE0},
- {Opt_journal_dev, 0, MOPT_GTE0},
- {Opt_journal_path, 0, MOPT_STRING},
- {Opt_journal_ioprio, 0, MOPT_GTE0},
+ {Opt_journal_dev, 0, MOPT_NO_EXT2 | MOPT_GTE0},
+ {Opt_journal_path, 0, MOPT_NO_EXT2 | MOPT_STRING},
+ {Opt_journal_ioprio, 0, MOPT_NO_EXT2 | MOPT_GTE0},
{Opt_data_journal, EXT4_MOUNT_JOURNAL_DATA, MOPT_NO_EXT2 | MOPT_DATAJ},
{Opt_data_ordered, EXT4_MOUNT_ORDERED_DATA, MOPT_NO_EXT2 | MOPT_DATAJ},
{Opt_data_writeback, EXT4_MOUNT_WRITEBACK_DATA,
--
2.1.0
next reply other threads:[~2015-06-26 16:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-26 16:03 Carlos Maiolino [this message]
2015-07-20 12:19 ` [PATCH] ext4: Reject mount an ext2 filesystem with journal options Carlos Maiolino
2015-07-22 3:58 ` Theodore Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1435334609-23192-1-git-send-email-cmaiolino@redhat.com \
--to=cmaiolino@redhat.com \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).