aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/mount_clnt.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 12:18:27 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 12:18:27 -0500
commit53846a21c1766326bb14ce8ab6e997a0c120675d (patch)
tree37b04485e29844b4e734479181276a2f4d2447e4 /fs/nfs/mount_clnt.c
parent2e9abdd9bad485970b37cd53a82f92702054984c (diff)
parent1ebbe2b20091d306453a5cf480a87e6cd28ae76f (diff)
Merge git://git.linux-nfs.org/pub/linux/nfs-2.6
* git://git.linux-nfs.org/pub/linux/nfs-2.6: (103 commits) SUNRPC,RPCSEC_GSS: spkm3--fix config dependencies SUNRPC,RPCSEC_GSS: spkm3: import contexts using NID_cast5_cbc LOCKD: Make nlmsvc_traverse_shares return void LOCKD: nlmsvc_traverse_blocks return is unused SUNRPC,RPCSEC_GSS: fix krb5 sequence numbers. NFSv4: Dont list system.nfs4_acl for filesystems that don't support it. SUNRPC,RPCSEC_GSS: remove unnecessary kmalloc of a checksum SUNRPC: Ensure rpc_call_async() always calls tk_ops->rpc_release() SUNRPC: Fix memory barriers for req->rq_received NFS: Fix a race in nfs_sync_inode() NFS: Clean up nfs_flush_list() NFS: Fix a race with PG_private and nfs_release_page() NFSv4: Ensure the callback daemon flushes signals SUNRPC: Fix a 'Busy inodes' error in rpc_pipefs NFS, NLM: Allow blocking locks to respect signals NFS: Make nfs_fhget() return appropriate error values NFSv4: Fix an oops in nfs4_fill_super lockd: blocks should hold a reference to the nlm_file NFSv4: SETCLIENTID_CONFIRM should handle NFS4ERR_DELAY/NFS4ERR_RESOURCE NFSv4: Send the delegation stateid for SETATTR calls ...
Diffstat (limited to 'fs/nfs/mount_clnt.c')
-rw-r--r--fs/nfs/mount_clnt.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c
index 0b9a78353d6e..445abb4d4214 100644
--- a/fs/nfs/mount_clnt.c
+++ b/fs/nfs/mount_clnt.c
@@ -49,9 +49,12 @@ nfsroot_mount(struct sockaddr_in *addr, char *path, struct nfs_fh *fh,
49 struct mnt_fhstatus result = { 49 struct mnt_fhstatus result = {
50 .fh = fh 50 .fh = fh
51 }; 51 };
52 struct rpc_message msg = {
53 .rpc_argp = path,
54 .rpc_resp = &result,
55 };
52 char hostname[32]; 56 char hostname[32];
53 int status; 57 int status;
54 int call;
55 58
56 dprintk("NFS: nfs_mount(%08x:%s)\n", 59 dprintk("NFS: nfs_mount(%08x:%s)\n",
57 (unsigned)ntohl(addr->sin_addr.s_addr), path); 60 (unsigned)ntohl(addr->sin_addr.s_addr), path);
@@ -61,8 +64,12 @@ nfsroot_mount(struct sockaddr_in *addr, char *path, struct nfs_fh *fh,
61 if (IS_ERR(mnt_clnt)) 64 if (IS_ERR(mnt_clnt))
62 return PTR_ERR(mnt_clnt); 65 return PTR_ERR(mnt_clnt);
63 66
64 call = (version == NFS_MNT3_VERSION) ? MOUNTPROC3_MNT : MNTPROC_MNT; 67 if (version == NFS_MNT3_VERSION)
65 status = rpc_call(mnt_clnt, call, path, &result, 0); 68 msg.rpc_proc = &mnt_clnt->cl_procinfo[MOUNTPROC3_MNT];
69 else
70 msg.rpc_proc = &mnt_clnt->cl_procinfo[MNTPROC_MNT];
71
72 status = rpc_call_sync(mnt_clnt, &msg, 0);
66 return status < 0? status : (result.status? -EACCES : 0); 73 return status < 0? status : (result.status? -EACCES : 0);
67} 74}
68 75
@@ -137,6 +144,8 @@ static struct rpc_procinfo mnt_procedures[] = {
137 .p_encode = (kxdrproc_t) xdr_encode_dirpath, 144 .p_encode = (kxdrproc_t) xdr_encode_dirpath,
138 .p_decode = (kxdrproc_t) xdr_decode_fhstatus, 145 .p_decode = (kxdrproc_t) xdr_decode_fhstatus,
139 .p_bufsiz = MNT_dirpath_sz << 2, 146 .p_bufsiz = MNT_dirpath_sz << 2,
147 .p_statidx = MNTPROC_MNT,
148 .p_name = "MOUNT",
140 }, 149 },
141}; 150};
142 151
@@ -146,6 +155,8 @@ static struct rpc_procinfo mnt3_procedures[] = {
146 .p_encode = (kxdrproc_t) xdr_encode_dirpath, 155 .p_encode = (kxdrproc_t) xdr_encode_dirpath,
147 .p_decode = (kxdrproc_t) xdr_decode_fhstatus3, 156 .p_decode = (kxdrproc_t) xdr_decode_fhstatus3,
148 .p_bufsiz = MNT_dirpath_sz << 2, 157 .p_bufsiz = MNT_dirpath_sz << 2,
158 .p_statidx = MOUNTPROC3_MNT,
159 .p_name = "MOUNT",
149 }, 160 },
150}; 161};
151 162