Commit 8d44d974 authored by OGAWA Hirofumi's avatar OGAWA Hirofumi Committed by Linus Torvalds

fat: fix parse_options()

Current parse_options() exits too early.  We need to run the code of
bottom in this function even if users doesn't specify options.
Signed-off-by: default avatarOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 3264d4de
...@@ -950,7 +950,7 @@ static int parse_options(char *options, int is_vfat, int silent, int *debug, ...@@ -950,7 +950,7 @@ static int parse_options(char *options, int is_vfat, int silent, int *debug,
*debug = 0; *debug = 0;
if (!options) if (!options)
return 0; goto out;
while ((p = strsep(&options, ",")) != NULL) { while ((p = strsep(&options, ",")) != NULL) {
int token; int token;
...@@ -1104,10 +1104,13 @@ static int parse_options(char *options, int is_vfat, int silent, int *debug, ...@@ -1104,10 +1104,13 @@ static int parse_options(char *options, int is_vfat, int silent, int *debug,
return -EINVAL; return -EINVAL;
} }
} }
out:
/* UTF-8 doesn't provide FAT semantics */ /* UTF-8 doesn't provide FAT semantics */
if (!strcmp(opts->iocharset, "utf8")) { if (!strcmp(opts->iocharset, "utf8")) {
printk(KERN_ERR "FAT: utf8 is not a recommended IO charset" printk(KERN_ERR "FAT: utf8 is not a recommended IO charset"
" for FAT filesystems, filesystem will be case sensitive!\n"); " for FAT filesystems, filesystem will be "
"case sensitive!\n");
} }
/* If user doesn't specify allow_utime, it's initialized from dmask. */ /* If user doesn't specify allow_utime, it's initialized from dmask. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment