diff options
-rw-r--r-- | fs/nfs/internal.h | 1 | ||||
-rw-r--r-- | fs/nfs/super.c | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index e4d6a8348adf..ffa6bd54d439 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h | |||
@@ -44,6 +44,7 @@ struct nfs_parsed_mount_data { | |||
44 | unsigned int auth_flavor_len; | 44 | unsigned int auth_flavor_len; |
45 | rpc_authflavor_t auth_flavors[1]; | 45 | rpc_authflavor_t auth_flavors[1]; |
46 | char *client_address; | 46 | char *client_address; |
47 | unsigned int minorversion; | ||
47 | char *fscache_uniq; | 48 | char *fscache_uniq; |
48 | 49 | ||
49 | struct { | 50 | struct { |
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index d2d67781c579..5a8fdc791cc1 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -90,6 +90,7 @@ enum { | |||
90 | Opt_mountport, | 90 | Opt_mountport, |
91 | Opt_mountvers, | 91 | Opt_mountvers, |
92 | Opt_nfsvers, | 92 | Opt_nfsvers, |
93 | Opt_minorversion, | ||
93 | 94 | ||
94 | /* Mount options that take string arguments */ | 95 | /* Mount options that take string arguments */ |
95 | Opt_sec, Opt_proto, Opt_mountproto, Opt_mounthost, | 96 | Opt_sec, Opt_proto, Opt_mountproto, Opt_mounthost, |
@@ -155,6 +156,7 @@ static const match_table_t nfs_mount_option_tokens = { | |||
155 | { Opt_mountvers, "mountvers=%u" }, | 156 | { Opt_mountvers, "mountvers=%u" }, |
156 | { Opt_nfsvers, "nfsvers=%u" }, | 157 | { Opt_nfsvers, "nfsvers=%u" }, |
157 | { Opt_nfsvers, "vers=%u" }, | 158 | { Opt_nfsvers, "vers=%u" }, |
159 | { Opt_minorversion, "minorversion=%u" }, | ||
158 | 160 | ||
159 | { Opt_sec, "sec=%s" }, | 161 | { Opt_sec, "sec=%s" }, |
160 | { Opt_proto, "proto=%s" }, | 162 | { Opt_proto, "proto=%s" }, |
@@ -1211,6 +1213,13 @@ static int nfs_parse_mount_options(char *raw, | |||
1211 | nfs_parse_invalid_value("nfsvers"); | 1213 | nfs_parse_invalid_value("nfsvers"); |
1212 | } | 1214 | } |
1213 | break; | 1215 | break; |
1216 | case Opt_minorversion: | ||
1217 | if (match_int(args, &option)) | ||
1218 | return 0; | ||
1219 | if (option < 0 || option > NFS4_MAX_MINOR_VERSION) | ||
1220 | return 0; | ||
1221 | mnt->minorversion = option; | ||
1222 | break; | ||
1214 | 1223 | ||
1215 | /* | 1224 | /* |
1216 | * options that take text values | 1225 | * options that take text values |
@@ -2261,6 +2270,7 @@ static int nfs4_validate_mount_data(void *options, | |||
2261 | args->nfs_server.port = NFS_PORT; /* 2049 unless user set port= */ | 2270 | args->nfs_server.port = NFS_PORT; /* 2049 unless user set port= */ |
2262 | args->auth_flavors[0] = RPC_AUTH_UNIX; | 2271 | args->auth_flavors[0] = RPC_AUTH_UNIX; |
2263 | args->auth_flavor_len = 0; | 2272 | args->auth_flavor_len = 0; |
2273 | args->minorversion = 0; | ||
2264 | 2274 | ||
2265 | switch (data->version) { | 2275 | switch (data->version) { |
2266 | case 1: | 2276 | case 1: |