From b9ba7aeb165cffecdffb60aec8c3fa8d590d9ca9 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Fri, 28 Apr 2000 01:09:25 +0000 Subject: Merge with 2.3.99-pre6. --- fs/nfs/nfsroot.c | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) (limited to 'fs/nfs/nfsroot.c') diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c index b632cf175..7c3a7a0cc 100644 --- a/fs/nfs/nfsroot.c +++ b/fs/nfs/nfsroot.c @@ -450,32 +450,16 @@ static int __init root_nfs_get_handle(void) return status; } - -/* - * Now actually mount the given directory. - */ -static int __init root_nfs_do_mount(struct super_block *sb) -{ - /* Pass the server address to NFS */ - set_sockaddr((struct sockaddr_in *) &nfs_data.addr, servaddr, nfs_port); - - /* Now (finally ;-)) read the super block for mounting */ - if (nfs_read_super(sb, &nfs_data, 1) == NULL) - return -1; - return 0; -} - - /* - * Get the NFS port numbers and file handle, and then read the super- - * block for mounting. + * Get the NFS port numbers and file handle, and return the prepared 'data' + * argument for ->read_super() if everything went OK. Return NULL otherwise. */ -int __init nfs_root_mount(struct super_block *sb) +void * __init nfs_root_data(void) { if (root_nfs_init() < 0 || root_nfs_ports() < 0 - || root_nfs_get_handle() < 0 - || root_nfs_do_mount(sb) < 0) - return -1; - return 0; + || root_nfs_get_handle() < 0) + return NULL; + set_sockaddr((struct sockaddr_in *) &nfs_data.addr, servaddr, nfs_port); + return (void*)&nfs_data; } -- cgit v1.2.3