]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - fs/fat/inode.c
fat: ix mount option parsing
[~shefty/rdma-dev.git] / fs / fat / inode.c
index 59ac83be2d5b52bb69777e2a0b31b1c615220e16..3b733a730952dcc23439afa8a5e5189c93414313 100644 (file)
@@ -972,41 +972,41 @@ static int parse_options(struct super_block *sb, char *options, int is_vfat,
                        break;
                case Opt_uid:
                        if (match_int(&args[0], &option))
-                               return 0;
+                               return -EINVAL;
                        opts->fs_uid = make_kuid(current_user_ns(), option);
                        if (!uid_valid(opts->fs_uid))
-                               return 0;
+                               return -EINVAL;
                        break;
                case Opt_gid:
                        if (match_int(&args[0], &option))
-                               return 0;
+                               return -EINVAL;
                        opts->fs_gid = make_kgid(current_user_ns(), option);
                        if (!gid_valid(opts->fs_gid))
-                               return 0;
+                               return -EINVAL;
                        break;
                case Opt_umask:
                        if (match_octal(&args[0], &option))
-                               return 0;
+                               return -EINVAL;
                        opts->fs_fmask = opts->fs_dmask = option;
                        break;
                case Opt_dmask:
                        if (match_octal(&args[0], &option))
-                               return 0;
+                               return -EINVAL;
                        opts->fs_dmask = option;
                        break;
                case Opt_fmask:
                        if (match_octal(&args[0], &option))
-                               return 0;
+                               return -EINVAL;
                        opts->fs_fmask = option;
                        break;
                case Opt_allow_utime:
                        if (match_octal(&args[0], &option))
-                               return 0;
+                               return -EINVAL;
                        opts->allow_utime = option & (S_IWGRP | S_IWOTH);
                        break;
                case Opt_codepage:
                        if (match_int(&args[0], &option))
-                               return 0;
+                               return -EINVAL;
                        opts->codepage = option;
                        break;
                case Opt_flush:
@@ -1014,9 +1014,9 @@ static int parse_options(struct super_block *sb, char *options, int is_vfat,
                        break;
                case Opt_time_offset:
                        if (match_int(&args[0], &option))
-                               return 0;
+                               return -EINVAL;
                        if (option < -12 * 60 || option > 12 * 60)
-                               return 0;
+                               return -EINVAL;
                        opts->tz_set = 1;
                        opts->time_offset = option;
                        break;