diff options
author | Chao Yu <chao2.yu@samsung.com> | 2014-03-18 09:07:59 +0800 |
---|---|---|
committer | Andreas Blaesius <skate4life@gmx.de> | 2016-06-05 21:21:21 +0200 |
commit | 144ad092deb5e0c5454f9486284b4a2278c20ca7 (patch) | |
tree | 7f1465377570ae1709cd6db4c61235e421b124a2 /fs/f2fs | |
parent | b5f4d51ec423cbea0ff66328bf9710e18ac54ac3 (diff) | |
download | kernel_samsung_espresso10-144ad092deb5e0c5454f9486284b4a2278c20ca7.zip kernel_samsung_espresso10-144ad092deb5e0c5454f9486284b4a2278c20ca7.tar.gz kernel_samsung_espresso10-144ad092deb5e0c5454f9486284b4a2278c20ca7.tar.bz2 |
f2fs: fix incorrect parsing with option string
Previously 'background_gc={on***,off***}' is being parsed as correct option,
with this patch we cloud fix the trivial bug in mount process.
Change log from v1:
o need to check length of parameter suggested by Jaegeuk Kim.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/super.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 094f3e4..4accb9a 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -258,9 +258,9 @@ static int parse_options(struct super_block *sb, char *options) if (!name) return -ENOMEM; - if (!strncmp(name, "on", 2)) + if (strlen(name) == 2 && !strncmp(name, "on", 2)) set_opt(sbi, BG_GC); - else if (!strncmp(name, "off", 3)) + else if (strlen(name) == 3 && !strncmp(name, "off", 3)) clear_opt(sbi, BG_GC); else { kfree(name); |