Merge branch 'devel-for-2.6.31' into for-2.6.31
[safe/jmp/linux-2.6] / fs / nfs / super.c
index b798ed1..3d46052 100644 (file)
@@ -90,6 +90,7 @@ enum {
        Opt_mountport,
        Opt_mountvers,
        Opt_nfsvers,
+       Opt_minorversion,
 
        /* Mount options that take string arguments */
        Opt_sec, Opt_proto, Opt_mountproto, Opt_mounthost,
@@ -155,6 +156,7 @@ static const match_table_t nfs_mount_option_tokens = {
        { Opt_mountvers, "mountvers=%s" },
        { Opt_nfsvers, "nfsvers=%s" },
        { Opt_nfsvers, "vers=%s" },
+       { Opt_minorversion, "minorversion=%u" },
 
        { Opt_sec, "sec=%s" },
        { Opt_proto, "proto=%s" },
@@ -977,6 +979,7 @@ static int nfs_parse_mount_options(char *raw,
        while ((p = strsep(&raw, ",")) != NULL) {
                substring_t args[MAX_OPT_ARGS];
                unsigned long option;
+               int int_option;
                int token;
 
                if (!*p)
@@ -1247,6 +1250,13 @@ static int nfs_parse_mount_options(char *raw,
                                goto out_invalid_value;
                        }
                        break;
+               case Opt_minorversion:
+                       if (match_int(args, &int_option))
+                               return 0;
+                       if (int_option < 0 || int_option > NFS4_MAX_MINOR_VERSION)
+                               return 0;
+                       mnt->minorversion = int_option;
+                       break;
 
                /*
                 * options that take text values
@@ -2308,6 +2318,7 @@ static int nfs4_validate_mount_data(void *options,
        args->nfs_server.port   = NFS_PORT; /* 2049 unless user set port= */
        args->auth_flavors[0]   = RPC_AUTH_UNIX;
        args->auth_flavor_len   = 0;
+       args->minorversion      = 0;
 
        switch (data->version) {
        case 1:
@@ -2524,12 +2535,13 @@ static void nfs4_kill_super(struct super_block *sb)
 {
        struct nfs_server *server = NFS_SB(sb);
 
+       dprintk("--> %s\n", __func__);
        nfs_super_return_all_delegations(sb);
        kill_anon_super(sb);
-
        nfs4_renewd_prepare_shutdown(server);
        nfs_fscache_release_super_cookie(sb);
        nfs_free_server(server);
+       dprintk("<-- %s\n", __func__);
 }
 
 /*