diff options
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r-- | fs/nfs/super.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 0b4cbdc60abd..83a31070bc1a 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -158,7 +158,7 @@ static const match_table_t nfs_mount_option_tokens = { | |||
158 | { Opt_mountvers, "mountvers=%s" }, | 158 | { Opt_mountvers, "mountvers=%s" }, |
159 | { Opt_nfsvers, "nfsvers=%s" }, | 159 | { Opt_nfsvers, "nfsvers=%s" }, |
160 | { Opt_nfsvers, "vers=%s" }, | 160 | { Opt_nfsvers, "vers=%s" }, |
161 | { Opt_minorversion, "minorversion=%u" }, | 161 | { Opt_minorversion, "minorversion=%s" }, |
162 | 162 | ||
163 | { Opt_sec, "sec=%s" }, | 163 | { Opt_sec, "sec=%s" }, |
164 | { Opt_proto, "proto=%s" }, | 164 | { Opt_proto, "proto=%s" }, |
@@ -1001,7 +1001,6 @@ static int nfs_parse_mount_options(char *raw, | |||
1001 | while ((p = strsep(&raw, ",")) != NULL) { | 1001 | while ((p = strsep(&raw, ",")) != NULL) { |
1002 | substring_t args[MAX_OPT_ARGS]; | 1002 | substring_t args[MAX_OPT_ARGS]; |
1003 | unsigned long option; | 1003 | unsigned long option; |
1004 | int int_option; | ||
1005 | int token; | 1004 | int token; |
1006 | 1005 | ||
1007 | if (!*p) | 1006 | if (!*p) |
@@ -1273,11 +1272,16 @@ static int nfs_parse_mount_options(char *raw, | |||
1273 | } | 1272 | } |
1274 | break; | 1273 | break; |
1275 | case Opt_minorversion: | 1274 | case Opt_minorversion: |
1276 | if (match_int(args, &int_option)) | 1275 | string = match_strdup(args); |
1277 | return 0; | 1276 | if (string == NULL) |
1278 | if (int_option < 0 || int_option > NFS4_MAX_MINOR_VERSION) | 1277 | goto out_nomem; |
1279 | return 0; | 1278 | rc = strict_strtoul(string, 10, &option); |
1280 | mnt->minorversion = int_option; | 1279 | kfree(string); |
1280 | if (rc != 0) | ||
1281 | goto out_invalid_value; | ||
1282 | if (option > NFS4_MAX_MINOR_VERSION) | ||
1283 | goto out_invalid_value; | ||
1284 | mnt->minorversion = option; | ||
1281 | break; | 1285 | break; |
1282 | 1286 | ||
1283 | /* | 1287 | /* |