From c93cf2d75779d73376e84e2547de1304113d3f1c Mon Sep 17 00:00:00 2001 From: Dmitry Monakhov Date: Sun, 18 Oct 2015 23:35:32 -0400 Subject: ext4: explicit mount options parsing cleanup Currently MOPT_EXPLICIT treated as EXPLICIT_DELALLOC which may be changed in future. Let's fix it now. Signed-off-by: Dmitry Monakhov Signed-off-by: Theodore Ts'o diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 639613f..db4be39 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1516,8 +1516,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)) { -- cgit v0.10.2