From: OGAWA Hirofumi Date: Fri, 25 Jul 2008 08:46:41 +0000 (-0700) Subject: fat: fix parse_options() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8d44d9741f6808c107a144f469fb89e6fe7c55e3;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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: OGAWA Hirofumi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 46a4508ffd2e..60deb5fd1188 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -950,7 +950,7 @@ static int parse_options(char *options, int is_vfat, int silent, int *debug, *debug = 0; if (!options) - return 0; + goto out; while ((p = strsep(&options, ",")) != NULL) { int token; @@ -1104,10 +1104,13 @@ static int parse_options(char *options, int is_vfat, int silent, int *debug, return -EINVAL; } } + +out: /* UTF-8 doesn't provide FAT semantics */ if (!strcmp(opts->iocharset, "utf8")) { 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. */