diff mbox

[1/2] ext4: explicit mount options parsing cleanup

Message ID 1444381799-10566-1-git-send-email-dmonakhov@openvz.org
State Accepted, archived
Headers show

Commit Message

Dmitry Monakhov Oct. 9, 2015, 9:09 a.m. UTC
Currently MOPT_EXPLICIT treated as EXPLICIT_DELALLOC which may be changed
in future. Let's fix it now.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
---
 fs/ext4/super.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

Comments

Theodore Ts'o Oct. 19, 2015, 3:57 a.m. UTC | #1
On Fri, Oct 09, 2015 at 01:09:58PM +0400, Dmitry Monakhov wrote:
> Currently MOPT_EXPLICIT treated as EXPLICIT_DELALLOC which may be changed
> in future. Let's fix it now.
> 
> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>

Applied, thanks.

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 7ef3fa5..e91f6d4 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1503,8 +1503,12 @@  static int handle_mount_opt(struct super_block *sb, char *opt, int token,
 		return -1;
 	if (args->from && (m->flags & MOPT_GTE0) && (arg < 0))
 		return -1;
-	if (m->flags & MOPT_EXPLICIT)
-		set_opt2(sb, EXPLICIT_DELALLOC);
+	if (m->flags & MOPT_EXPLICIT) {
+		if (m->mount_opt & EXT4_MOUNT_DELALLOC) {
+			set_opt2(sb, EXPLICIT_DELALLOC);
+		} else
+			return -1;
+	}
 	if (m->flags & MOPT_CLEAR_ERR)
 		clear_opt(sb, ERRORS_MASK);
 	if (token == Opt_noquota && sb_any_quota_loaded(sb)) {