diff options
| author | Dmitry Monakhov <dmonakhov@openvz.org> | 2015-10-18 23:35:32 -0400 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-12-31 01:44:56 +0100 |
| commit | a45836288a2a8e62f46da333edc5fdbdff7b53fa (patch) | |
| tree | 69cbe03f83c1a487070eb974e23136d17efe640e /fs/ext4 | |
| parent | c657f8807171d436ed79b9a5dabe83a0f6eefac6 (diff) | |
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 <dmonakhov@openvz.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Joe Maples <joe@frap129.org>
Diffstat (limited to 'fs/ext4')
| -rw-r--r-- | fs/ext4/super.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 0c076a93f..acb7717f7 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -1514,8 +1514,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)) { |
