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) | |
download | op-kernel-dev-c5d120f8e8b464368a7dcb038dc5c077d234d10a.zip op-kernel-dev-c5d120f8e8b464368a7dcb038dc5c077d234d10a.tar.gz |
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 a96e5fd..f015e0d 100644 --- a/fs/nfs/nfsroot.c +++ b/fs/nfs/nfsroot.c @@ -487,15 +487,20 @@ static int __init root_nfs_get_handle(void) { struct nfs_fh fh; struct sockaddr_in sin; + struct nfs_mount_request request = { + .sap = (struct sockaddr *)&sin, + .salen = sizeof(sin), + .dirpath = nfs_export_path, + .version = (nfs_data.flags & NFS_MOUNT_VER3) ? + NFS_MNT3_VERSION : NFS_MNT_VERSION, + .protocol = (nfs_data.flags & NFS_MOUNT_TCP) ? + XPRT_TRANSPORT_TCP : XPRT_TRANSPORT_UDP, + .fh = &fh, + }; int status; - int protocol = (nfs_data.flags & NFS_MOUNT_TCP) ? - XPRT_TRANSPORT_TCP : XPRT_TRANSPORT_UDP; - int version = (nfs_data.flags & NFS_MOUNT_VER3) ? - NFS_MNT3_VERSION : NFS_MNT_VERSION; set_sockaddr(&sin, servaddr, htons(mount_port)); - status = nfs_mount((struct sockaddr *) &sin, sizeof(sin), NULL, - nfs_export_path, version, protocol, &fh); + status = nfs_mount(&request); if (status < 0) printk(KERN_ERR "Root-NFS: Server returned error %d " "while mounting %s\n", status, nfs_export_path); |