1 ext4: explicit mount options parsing cleanup
3 From: Dmitry Monakhov <dmonakhov@openvz.org>
5 Currently MOPT_EXPLICIT treated as EXPLICIT_DELALLOC which may be changed
6 in future. Let's fix it now.
8 Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
9 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
11 fs/ext4/super.c | 8 ++++++--
12 1 files changed, 6 insertions(+), 2 deletions(-)
14 diff --git a/fs/ext4/super.c b/fs/ext4/super.c
15 index 7ef3fa5..e91f6d4 100644
18 @@ -1503,8 +1503,12 @@ static int handle_mount_opt(struct super_block *sb, char *opt, int token,
20 if (args->from && (m->flags & MOPT_GTE0) && (arg < 0))
22 - if (m->flags & MOPT_EXPLICIT)
23 - set_opt2(sb, EXPLICIT_DELALLOC);
24 + if (m->flags & MOPT_EXPLICIT) {
25 + if (m->mount_opt & EXT4_MOUNT_DELALLOC) {
26 + set_opt2(sb, EXPLICIT_DELALLOC);
30 if (m->flags & MOPT_CLEAR_ERR)
31 clear_opt(sb, ERRORS_MASK);
32 if (token == Opt_noquota && sb_any_quota_loaded(sb)) {