summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2013-06-27 15:54:39 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-06-28 15:49:49 -0400
commit294ae81d4f89c76b7c5bbad7b14a43c02f6d738d (patch)
tree3473e0cf09852e3a9bcee85aaaf504c63de95b57 /fs/nfs
parentd17540c61bc7b0c7be45d0d2b6244ddbc9ba6aee (diff)
downloadlinux-294ae81d4f89c76b7c5bbad7b14a43c02f6d738d.tar.bz2
nfs: move server_authlist into nfs_try_mount_request
In a later patch we're going to want to cycle over this list and attempt to call ->create_server for each different flavor until one succeeds. Move the list allocation to the stack of nfs_try_mount_request() and pass a pointer to it and its length to nfs_request_mount(). Cc: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/super.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index afeee810f453..a0949f5c00ba 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1701,10 +1701,10 @@ out_err:
* corresponding to the provided path.
*/
static int nfs_request_mount(struct nfs_parsed_mount_data *args,
- struct nfs_fh *root_fh)
+ struct nfs_fh *root_fh,
+ rpc_authflavor_t *server_authlist,
+ unsigned int *server_authlist_len)
{
- rpc_authflavor_t server_authlist[NFS_MAX_SECFLAVORS];
- unsigned int server_authlist_len = ARRAY_SIZE(server_authlist);
struct nfs_mount_request request = {
.sap = (struct sockaddr *)
&args->mount_server.address,
@@ -1712,7 +1712,7 @@ static int nfs_request_mount(struct nfs_parsed_mount_data *args,
.protocol = args->mount_server.protocol,
.fh = root_fh,
.noresvport = args->flags & NFS_MOUNT_NORESVPORT,
- .auth_flav_len = &server_authlist_len,
+ .auth_flav_len = server_authlist_len,
.auth_flavs = server_authlist,
.net = args->net,
};
@@ -1763,8 +1763,12 @@ static struct nfs_server *nfs_try_mount_request(struct nfs_mount_info *mount_inf
struct nfs_subversion *nfs_mod)
{
int status;
+ struct nfs_parsed_mount_data *args = mount_info->parsed;
+ rpc_authflavor_t authlist[NFS_MAX_SECFLAVORS];
+ unsigned int authlist_len = ARRAY_SIZE(authlist);
- status = nfs_request_mount(mount_info->parsed, mount_info->mntfh);
+ status = nfs_request_mount(args, mount_info->mntfh, authlist,
+ &authlist_len);
if (status)
return ERR_PTR(status);