diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-30 20:45:45 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-30 20:45:45 -0500 |
commit | f57fa1d6a6b3414e853d3d17e339ac48816e4406 (patch) | |
tree | e1d3acdb12f902e916765915a4f9a65cbae909cc /fs/nfs/mount_clnt.c | |
parent | 6094c85a935f7eadb4c607c6dc6d86c0a9f09a4b (diff) | |
parent | 08cc36cbd1ee7d86422713bb21551eed1326b894 (diff) |
Merge git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (70 commits)
fs/nfs/nfs4proc.c: make nfs4_map_errors() static
rpc: add service field to new upcall
rpc: add target field to new upcall
nfsd: support callbacks with gss flavors
rpc: allow gss callbacks to client
rpc: pass target name down to rpc level on callbacks
nfsd: pass client principal name in rsc downcall
rpc: implement new upcall
rpc: store pointer to pipe inode in gss upcall message
rpc: use count of pipe openers to wait for first open
rpc: track number of users of the gss upcall pipe
rpc: call release_pipe only on last close
rpc: add an rpc_pipe_open method
rpc: minor gss_alloc_msg cleanup
rpc: factor out warning code from gss_pipe_destroy_msg
rpc: remove unnecessary assignment
NFS: remove unused status from encode routines
NFS: increment number of operations in each encode routine
NFS: fix comment placement in nfs4xdr.c
NFS: fix tabs in nfs4xdr.c
...
Diffstat (limited to 'fs/nfs/mount_clnt.c')
-rw-r--r-- | fs/nfs/mount_clnt.c | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c index 086a6830d785..ca905a5bb1ba 100644 --- a/fs/nfs/mount_clnt.c +++ b/fs/nfs/mount_clnt.c | |||
@@ -29,47 +29,43 @@ struct mnt_fhstatus { | |||
29 | 29 | ||
30 | /** | 30 | /** |
31 | * nfs_mount - Obtain an NFS file handle for the given host and path | 31 | * nfs_mount - Obtain an NFS file handle for the given host and path |
32 | * @addr: pointer to server's address | 32 | * @info: pointer to mount request arguments |
33 | * @len: size of server's address | ||
34 | * @hostname: name of server host, or NULL | ||
35 | * @path: pointer to string containing export path to mount | ||
36 | * @version: mount version to use for this request | ||
37 | * @protocol: transport protocol to use for thie request | ||
38 | * @fh: pointer to location to place returned file handle | ||
39 | * | 33 | * |
40 | * Uses default timeout parameters specified by underlying transport. | 34 | * Uses default timeout parameters specified by underlying transport. |
41 | */ | 35 | */ |
42 | int nfs_mount(struct sockaddr *addr, size_t len, char *hostname, char *path, | 36 | int nfs_mount(struct nfs_mount_request *info) |
43 | int version, int protocol, struct nfs_fh *fh) | ||
44 | { | 37 | { |
45 | struct mnt_fhstatus result = { | 38 | struct mnt_fhstatus result = { |
46 | .fh = fh | 39 | .fh = info->fh |
47 | }; | 40 | }; |
48 | struct rpc_message msg = { | 41 | struct rpc_message msg = { |
49 | .rpc_argp = path, | 42 | .rpc_argp = info->dirpath, |
50 | .rpc_resp = &result, | 43 | .rpc_resp = &result, |
51 | }; | 44 | }; |
52 | struct rpc_create_args args = { | 45 | struct rpc_create_args args = { |
53 | .protocol = protocol, | 46 | .protocol = info->protocol, |
54 | .address = addr, | 47 | .address = info->sap, |
55 | .addrsize = len, | 48 | .addrsize = info->salen, |
56 | .servername = hostname, | 49 | .servername = info->hostname, |
57 | .program = &mnt_program, | 50 | .program = &mnt_program, |
58 | .version = version, | 51 | .version = info->version, |
59 | .authflavor = RPC_AUTH_UNIX, | 52 | .authflavor = RPC_AUTH_UNIX, |
60 | .flags = 0, | ||
61 | }; | 53 | }; |
62 | struct rpc_clnt *mnt_clnt; | 54 | struct rpc_clnt *mnt_clnt; |
63 | int status; | 55 | int status; |
64 | 56 | ||
65 | dprintk("NFS: sending MNT request for %s:%s\n", | 57 | dprintk("NFS: sending MNT request for %s:%s\n", |
66 | (hostname ? hostname : "server"), path); | 58 | (info->hostname ? info->hostname : "server"), |
59 | info->dirpath); | ||
60 | |||
61 | if (info->noresvport) | ||
62 | args.flags |= RPC_CLNT_CREATE_NONPRIVPORT; | ||
67 | 63 | ||
68 | mnt_clnt = rpc_create(&args); | 64 | mnt_clnt = rpc_create(&args); |
69 | if (IS_ERR(mnt_clnt)) | 65 | if (IS_ERR(mnt_clnt)) |
70 | goto out_clnt_err; | 66 | goto out_clnt_err; |
71 | 67 | ||
72 | if (version == NFS_MNT3_VERSION) | 68 | if (info->version == NFS_MNT3_VERSION) |
73 | msg.rpc_proc = &mnt_clnt->cl_procinfo[MOUNTPROC3_MNT]; | 69 | msg.rpc_proc = &mnt_clnt->cl_procinfo[MOUNTPROC3_MNT]; |
74 | else | 70 | else |
75 | msg.rpc_proc = &mnt_clnt->cl_procinfo[MNTPROC_MNT]; | 71 | msg.rpc_proc = &mnt_clnt->cl_procinfo[MNTPROC_MNT]; |