From fdd0b2648ca30f8d80d31b1ea83648a2a531bf4c Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Sun, 18 Oct 2015 23:48:48 -0400 Subject: [PATCH] add patch explicit-mount-options-parsing-cleanup --- explicit-mount-options-parsing-cleanup | 36 ++++++++++++++++++++++++++++++++++ series | 2 ++ timestamps | 7 ++++--- 3 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 explicit-mount-options-parsing-cleanup diff --git a/explicit-mount-options-parsing-cleanup b/explicit-mount-options-parsing-cleanup new file mode 100644 index 00000000..75aa22ae --- /dev/null +++ b/explicit-mount-options-parsing-cleanup @@ -0,0 +1,36 @@ +ext4: explicit mount options parsing cleanup + +From: Dmitry Monakhov + +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 +--- + 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 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)) { +-- +1.7.1 + + diff --git a/series b/series index 2b8f8769..87e65d38 100644 --- a/series +++ b/series @@ -25,6 +25,8 @@ fix-potential-use-after-free-in-ext4_journal-stop fix-calculation-of-meta_bg-descriptor-backups ensure-entering-into-panic-after-recording-an-error-in-superblock +explicit-mount-options-parsing-cleanup + ########################################## # unstable patches #################################################### diff --git a/timestamps b/timestamps index a5bb2d0e..2840ba4c 100755 --- a/timestamps +++ b/timestamps @@ -46,7 +46,8 @@ touch -d @1445135301 fix-xfstest-generic-269-double-revoked-buffer-bug touch -d @1445135709 fix-checkpoint-list-cleanup touch -d @1445137026 fix-potential-use-after-free-in-ext4_journal-stop touch -d @1445142989 fix-calculation-of-meta_bg-descriptor-backups -touch -d @1445142999 status touch -d @1445202176 ensure-entering-into-panic-after-recording-an-error-in-superblock -touch -d @1445202186 series -touch -d @1445202188 timestamps +touch -d @1445202193 status +touch -d @1445225732 explicit-mount-options-parsing-cleanup +touch -d @1445226423 series +touch -d @1445226427 timestamps -- 2.11.4.GIT