]> err.no Git - linux-2.6/commitdiff
fat: fix parse_options()
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Fri, 25 Jul 2008 08:46:41 +0000 (01:46 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 25 Jul 2008 17:53:34 +0000 (10:53 -0700)
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 <hirofumi@mail.parknet.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/fat/inode.c

index 46a4508ffd2eba5cbf10be8122d60f721883f934..60deb5fd11885f54931295e3bd22b25cfa6f9b7c 100644 (file)
@@ -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. */