]> Git Repo - linux.git/blobdiff - fs/nfs/super.c
x86/unwind: Rename unwinder config options to 'CONFIG_UNWINDER_*'
[linux.git] / fs / nfs / super.c
index d828ef88e7db63e83b74e34ef918bee0fbe2b362..c9d24bae302514957435350f8a8a560e98c8a961 100644 (file)
@@ -812,7 +812,7 @@ int nfs_show_stats(struct seq_file *m, struct dentry *root)
         * Display all mount option settings
         */
        seq_printf(m, "\n\topts:\t");
-       seq_puts(m, root->d_sb->s_flags & MS_RDONLY ? "ro" : "rw");
+       seq_puts(m, sb_rdonly(root->d_sb) ? "ro" : "rw");
        seq_puts(m, root->d_sb->s_flags & MS_SYNCHRONOUS ? ",sync" : "");
        seq_puts(m, root->d_sb->s_flags & MS_NOATIME ? ",noatime" : "");
        seq_puts(m, root->d_sb->s_flags & MS_NODIRATIME ? ",nodiratime" : "");
@@ -1691,8 +1691,8 @@ static int nfs_verify_authflavors(struct nfs_parsed_mount_data *args,
                        rpc_authflavor_t *server_authlist, unsigned int count)
 {
        rpc_authflavor_t flavor = RPC_AUTH_MAXFLAVOR;
+       bool found_auth_null = false;
        unsigned int i;
-       int use_auth_null = false;
 
        /*
         * If the sec= mount option is used, the specified flavor or AUTH_NULL
@@ -1701,6 +1701,10 @@ static int nfs_verify_authflavors(struct nfs_parsed_mount_data *args,
         * AUTH_NULL has a special meaning when it's in the server list - it
         * means that the server will ignore the rpc creds, so any flavor
         * can be used but still use the sec= that was specified.
+        *
+        * Note also that the MNT procedure in MNTv1 does not return a list
+        * of supported security flavors. In this case, nfs_mount() fabricates
+        * a security flavor list containing just AUTH_NULL.
         */
        for (i = 0; i < count; i++) {
                flavor = server_authlist[i];
@@ -1709,11 +1713,11 @@ static int nfs_verify_authflavors(struct nfs_parsed_mount_data *args,
                        goto out;
 
                if (flavor == RPC_AUTH_NULL)
-                       use_auth_null = true;
+                       found_auth_null = true;
        }
 
-       if (use_auth_null) {
-               flavor = RPC_AUTH_NULL;
+       if (found_auth_null) {
+               flavor = args->auth_info.flavors[0];
                goto out;
        }
 
This page took 0.030661 seconds and 4 git commands to generate.