]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blobdiff - fs/nfs/namespace.c
NFS: Honor the authflavor set in the clone mount data
[mirror_ubuntu-focal-kernel.git] / fs / nfs / namespace.c
index b9a593d056b3f2bd8761065100231fac06e8dff0..78dde307317f3dca7d1d8bf8c44002af96c22053 100644 (file)
@@ -257,7 +257,6 @@ struct vfsmount *nfs_d_automount(struct path *path)
        struct nfs_fh *fh = NULL;
        struct nfs_fattr *fattr = NULL;
        struct rpc_clnt *client;
-       rpc_authflavor_t flavor = RPC_AUTH_UNIX;
 
        dprintk("--> nfs_d_automount()\n");
 
@@ -285,7 +284,7 @@ struct vfsmount *nfs_d_automount(struct path *path)
        if (fattr->valid & NFS_ATTR_FATTR_V4_REFERRAL)
                mnt = nfs_do_refmount(client, path->dentry);
        else
-               mnt = nfs_do_submount(path->dentry, fh, fattr, flavor);
+               mnt = nfs_do_submount(path->dentry, fh, fattr, client->cl_auth->au_flavor);
        rpc_shutdown_client(client);
 
        if (IS_ERR(mnt))