diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2008-12-23 15:21:35 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-12-23 15:21:35 -0500 |
commit | c5d120f8e8b464368a7dcb038dc5c077d234d10a (patch) | |
tree | 28ec4ffebf3ebe0cdd1ed9c5ba174457b5960e32 /fs/nfs/nfsroot.c | |
parent | 146ec944bbd31d241a44a00518b054fb01921d22 (diff) |
NFS: introduce nfs_mount_info struct for calling nfs_mount()
Clean up: convert nfs_mount() to take a single data structure argument to make
it simpler to add more arguments.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfsroot.c')
-rw-r--r-- | fs/nfs/nfsroot.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c index a96e5fdb38af..f015e0d62add 100644 --- a/fs/nfs/nfsroot.c +++ b/fs/nfs/nfsroot.c | |||
@@ -487,15 +487,20 @@ static int __init root_nfs_get_handle(void) | |||
487 | { | 487 | { |
488 | struct nfs_fh fh; | 488 | struct nfs_fh fh; |
489 | struct sockaddr_in sin; | 489 | struct sockaddr_in sin; |
490 | struct nfs_mount_request request = { | ||
491 | .sap = (struct sockaddr *)&sin, | ||
492 | .salen = sizeof(sin), | ||
493 | .dirpath = nfs_export_path, | ||
494 | .version = (nfs_data.flags & NFS_MOUNT_VER3) ? | ||
495 | NFS_MNT3_VERSION : NFS_MNT_VERSION, | ||
496 | .protocol = (nfs_data.flags & NFS_MOUNT_TCP) ? | ||
497 | XPRT_TRANSPORT_TCP : XPRT_TRANSPORT_UDP, | ||
498 | .fh = &fh, | ||
499 | }; | ||
490 | int status; | 500 | int status; |
491 | int protocol = (nfs_data.flags & NFS_MOUNT_TCP) ? | ||
492 | XPRT_TRANSPORT_TCP : XPRT_TRANSPORT_UDP; | ||
493 | int version = (nfs_data.flags & NFS_MOUNT_VER3) ? | ||
494 | NFS_MNT3_VERSION : NFS_MNT_VERSION; | ||
495 | 501 | ||
496 | set_sockaddr(&sin, servaddr, htons(mount_port)); | 502 | set_sockaddr(&sin, servaddr, htons(mount_port)); |
497 | status = nfs_mount((struct sockaddr *) &sin, sizeof(sin), NULL, | 503 | status = nfs_mount(&request); |
498 | nfs_export_path, version, protocol, &fh); | ||
499 | if (status < 0) | 504 | if (status < 0) |
500 | printk(KERN_ERR "Root-NFS: Server returned error %d " | 505 | printk(KERN_ERR "Root-NFS: Server returned error %d " |
501 | "while mounting %s\n", status, nfs_export_path); | 506 | "while mounting %s\n", status, nfs_export_path); |