Skip to content

Commit

Permalink
fat: fix parse_options()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
OGAWA Hirofumi authored and Linus Torvalds committed Jul 25, 2008
1 parent 3264d4d commit 8d44d97
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fs/fat/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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. */
Expand Down

0 comments on commit 8d44d97

Please sign in to comment.