ia64/xen-unstable

changeset 136:0e7853339ecd

bitkeeper revision 1.22.2.12 (3e46be8fKXI1VIYDI9AyPiLXAYvdQQ)

.del-nfsroot.c~c37fd8e4992ee67d:
Delete: xenolinux-2.4.16-sparse/fs/nfs/nfsroot.c
author kaf24@labyrinth.cl.cam.ac.uk
date Sun Feb 09 20:48:15 2003 +0000 (2003-02-09)
parents d3aad71a5893
children 4c6ae683ed61
files .rootkeys xenolinux-2.4.16-sparse/fs/nfs/nfsroot.c
line diff
     1.1 --- a/.rootkeys	Sun Feb 09 13:47:52 2003 +0000
     1.2 +++ b/.rootkeys	Sun Feb 09 20:48:15 2003 +0000
     1.3 @@ -317,7 +317,6 @@ 3ddb79bbx682YH6vR2zbVOXwg73ULg xenolinux
     1.4  3ddb79bcJfHdwrPsjqgI33_OsGdVCg xenolinux-2.4.16-sparse/drivers/block/rd.c
     1.5  3ddb79bcpVu-IbnqwQqpRqsEbLpsuw xenolinux-2.4.16-sparse/drivers/char/tty_io.c
     1.6  3e15d5273gfR2fbcYe05kqBSAvCX_w xenolinux-2.4.16-sparse/fs/exec.c
     1.7 -3ddb79bba_zKpuurHVeWfgDkyPoq8A xenolinux-2.4.16-sparse/fs/nfs/nfsroot.c
     1.8  3ddb79b8VFtfWSCrXKPN2K21zd_vtw xenolinux-2.4.16-sparse/include/asm-xeno/a.out.h
     1.9  3ddb79b8Zzi13p3OAPV25QgiC3THAQ xenolinux-2.4.16-sparse/include/asm-xeno/apic.h
    1.10  3ddb79baZDlsdV_m6C5CXnWMl15p1g xenolinux-2.4.16-sparse/include/asm-xeno/apicdef.h
     2.1 --- a/xenolinux-2.4.16-sparse/fs/nfs/nfsroot.c	Sun Feb 09 13:47:52 2003 +0000
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,466 +0,0 @@
     2.4 -/*
     2.5 - *  $Id: nfsroot.c,v 1.45 1998/03/07 10:44:46 mj Exp $
     2.6 - *
     2.7 - *  Copyright (C) 1995, 1996  Gero Kuhlmann <gero@gkminix.han.de>
     2.8 - *
     2.9 - *  Allow an NFS filesystem to be mounted as root. The way this works is:
    2.10 - *     (1) Use the IP autoconfig mechanism to set local IP addresses and routes.
    2.11 - *     (2) Handle RPC negotiation with the system which replied to RARP or
    2.12 - *         was reported as a boot server by BOOTP or manually.
    2.13 - *     (3) The actual mounting is done later, when init() is running.
    2.14 - *
    2.15 - *
    2.16 - *	Changes:
    2.17 - *
    2.18 - *	Alan Cox	:	Removed get_address name clash with FPU.
    2.19 - *	Alan Cox	:	Reformatted a bit.
    2.20 - *	Gero Kuhlmann	:	Code cleanup
    2.21 - *	Michael Rausch  :	Fixed recognition of an incoming RARP answer.
    2.22 - *	Martin Mares	: (2.0)	Auto-configuration via BOOTP supported.
    2.23 - *	Martin Mares	:	Manual selection of interface & BOOTP/RARP.
    2.24 - *	Martin Mares	:	Using network routes instead of host routes,
    2.25 - *				allowing the default configuration to be used
    2.26 - *				for normal operation of the host.
    2.27 - *	Martin Mares	:	Randomized timer with exponential backoff
    2.28 - *				installed to minimize network congestion.
    2.29 - *	Martin Mares	:	Code cleanup.
    2.30 - *	Martin Mares	: (2.1)	BOOTP and RARP made configuration options.
    2.31 - *	Martin Mares	:	Server hostname generation fixed.
    2.32 - *	Gerd Knorr	:	Fixed wired inode handling
    2.33 - *	Martin Mares	: (2.2)	"0.0.0.0" addresses from command line ignored.
    2.34 - *	Martin Mares	:	RARP replies not tested for server address.
    2.35 - *	Gero Kuhlmann	: (2.3) Some bug fixes and code cleanup again (please
    2.36 - *				send me your new patches _before_ bothering
    2.37 - *				Linus so that I don' always have to cleanup
    2.38 - *				_afterwards_ - thanks)
    2.39 - *	Gero Kuhlmann	:	Last changes of Martin Mares undone.
    2.40 - *	Gero Kuhlmann	: 	RARP replies are tested for specified server
    2.41 - *				again. However, it's now possible to have
    2.42 - *				different RARP and NFS servers.
    2.43 - *	Gero Kuhlmann	:	"0.0.0.0" addresses from command line are
    2.44 - *				now mapped to INADDR_NONE.
    2.45 - *	Gero Kuhlmann	:	Fixed a bug which prevented BOOTP path name
    2.46 - *				from being used (thanks to Leo Spiekman)
    2.47 - *	Andy Walker	:	Allow to specify the NFS server in nfs_root
    2.48 - *				without giving a path name
    2.49 - *	Swen Thümmler	:	Allow to specify the NFS options in nfs_root
    2.50 - *				without giving a path name. Fix BOOTP request
    2.51 - *				for domainname (domainname is NIS domain, not
    2.52 - *				DNS domain!). Skip dummy devices for BOOTP.
    2.53 - *	Jacek Zapala	:	Fixed a bug which prevented server-ip address
    2.54 - *				from nfsroot parameter from being used.
    2.55 - *	Olaf Kirch	:	Adapted to new NFS code.
    2.56 - *	Jakub Jelinek	:	Free used code segment.
    2.57 - *	Marko Kohtala	:	Fixed some bugs.
    2.58 - *	Martin Mares	:	Debug message cleanup
    2.59 - *	Martin Mares	:	Changed to use the new generic IP layer autoconfig
    2.60 - *				code. BOOTP and RARP moved there.
    2.61 - *	Martin Mares	:	Default path now contains host name instead of
    2.62 - *				host IP address (but host name defaults to IP
    2.63 - *				address anyway).
    2.64 - *	Martin Mares	:	Use root_server_addr appropriately during setup.
    2.65 - *	Martin Mares	:	Rewrote parameter parsing, now hopefully giving
    2.66 - *				correct overriding.
    2.67 - *	Trond Myklebust :	Add in preliminary support for NFSv3 and TCP.
    2.68 - *				Fix bug in root_nfs_addr(). nfs_data.namlen
    2.69 - *				is NOT for the length of the hostname.
    2.70 - */
    2.71 -
    2.72 -#include <linux/config.h>
    2.73 -#include <linux/types.h>
    2.74 -#include <linux/string.h>
    2.75 -#include <linux/kernel.h>
    2.76 -#include <linux/sched.h>
    2.77 -#include <linux/fs.h>
    2.78 -#include <linux/init.h>
    2.79 -#include <linux/sunrpc/clnt.h>
    2.80 -#include <linux/nfs.h>
    2.81 -#include <linux/nfs_fs.h>
    2.82 -#include <linux/nfs_mount.h>
    2.83 -#include <linux/in.h>
    2.84 -#include <linux/inet.h>
    2.85 -#include <linux/major.h>
    2.86 -#include <linux/utsname.h>
    2.87 -#include <net/ipconfig.h>
    2.88 -
    2.89 -/* Define this to allow debugging output */
    2.90 -#undef NFSROOT_DEBUG
    2.91 -#define NFSDBG_FACILITY NFSDBG_ROOT
    2.92 -
    2.93 -/* Default path we try to mount. "%s" gets replaced by our IP address */
    2.94 -#define NFS_ROOT		"/tftpboot/%s"
    2.95 -
    2.96 -/* Parameters passed from the kernel command line */
    2.97 -static char nfs_root_name[256] __initdata = "";
    2.98 -
    2.99 -/* Address of NFS server */
   2.100 -static __u32 servaddr __initdata = 0;
   2.101 -
   2.102 -/* Name of directory to mount */
   2.103 -static char nfs_path[NFS_MAXPATHLEN] __initdata = { 0, };
   2.104 -
   2.105 -/* NFS-related data */
   2.106 -static struct nfs_mount_data nfs_data __initdata = { 0, };/* NFS mount info */
   2.107 -static int nfs_port __initdata = 0;		/* Port to connect to for NFS */
   2.108 -static int mount_port __initdata = 0;		/* Mount daemon port number */
   2.109 -
   2.110 -
   2.111 -/***************************************************************************
   2.112 -
   2.113 -			     Parsing of options
   2.114 -
   2.115 - ***************************************************************************/
   2.116 -
   2.117 -/*
   2.118 - *  The following integer options are recognized
   2.119 - */
   2.120 -static struct nfs_int_opts {
   2.121 -	char *name;
   2.122 -	int  *val;
   2.123 -} root_int_opts[] __initdata = {
   2.124 -	{ "port",	&nfs_port },
   2.125 -	{ "rsize",	&nfs_data.rsize },
   2.126 -	{ "wsize",	&nfs_data.wsize },
   2.127 -	{ "timeo",	&nfs_data.timeo },
   2.128 -	{ "retrans",	&nfs_data.retrans },
   2.129 -	{ "acregmin",	&nfs_data.acregmin },
   2.130 -	{ "acregmax",	&nfs_data.acregmax },
   2.131 -	{ "acdirmin",	&nfs_data.acdirmin },
   2.132 -	{ "acdirmax",	&nfs_data.acdirmax },
   2.133 -	{ NULL,		NULL }
   2.134 -};
   2.135 -
   2.136 -
   2.137 -/*
   2.138 - *  And now the flag options
   2.139 - */
   2.140 -static struct nfs_bool_opts {
   2.141 -	char *name;
   2.142 -	int  and_mask;
   2.143 -	int  or_mask;
   2.144 -} root_bool_opts[] __initdata = {
   2.145 -	{ "soft",	~NFS_MOUNT_SOFT,	NFS_MOUNT_SOFT },
   2.146 -	{ "hard",	~NFS_MOUNT_SOFT,	0 },
   2.147 -	{ "intr",	~NFS_MOUNT_INTR,	NFS_MOUNT_INTR },
   2.148 -	{ "nointr",	~NFS_MOUNT_INTR,	0 },
   2.149 -	{ "posix",	~NFS_MOUNT_POSIX,	NFS_MOUNT_POSIX },
   2.150 -	{ "noposix",	~NFS_MOUNT_POSIX,	0 },
   2.151 -	{ "cto",	~NFS_MOUNT_NOCTO,	0 },
   2.152 -	{ "nocto",	~NFS_MOUNT_NOCTO,	NFS_MOUNT_NOCTO },
   2.153 -	{ "ac",		~NFS_MOUNT_NOAC,	0 },
   2.154 -	{ "noac",	~NFS_MOUNT_NOAC,	NFS_MOUNT_NOAC },
   2.155 -	{ "lock",	~NFS_MOUNT_NONLM,	0 },
   2.156 -	{ "nolock",	~NFS_MOUNT_NONLM,	NFS_MOUNT_NONLM },
   2.157 -#ifdef CONFIG_NFS_V3
   2.158 -	{ "v2",		~NFS_MOUNT_VER3,	0 },
   2.159 -	{ "v3",		~NFS_MOUNT_VER3,	NFS_MOUNT_VER3 },
   2.160 -#endif
   2.161 -	{ "udp",	~NFS_MOUNT_TCP,		0 },
   2.162 -	{ "tcp",	~NFS_MOUNT_TCP,		NFS_MOUNT_TCP },
   2.163 -	{ "broken_suid",~NFS_MOUNT_BROKEN_SUID,	NFS_MOUNT_BROKEN_SUID },
   2.164 -	{ NULL,		0,			0 }
   2.165 -};
   2.166 -
   2.167 -
   2.168 -/*
   2.169 - *  Extract IP address from the parameter string if needed. Note that we
   2.170 - *  need to have root_server_addr set _before_ IPConfig gets called as it
   2.171 - *  can override it.
   2.172 - */
   2.173 -static void __init root_nfs_parse_addr(char *name)
   2.174 -{
   2.175 -	int octets = 0;
   2.176 -	char *cp, *cq;
   2.177 -
   2.178 -	cp = cq = name;
   2.179 -	while (octets < 4) {
   2.180 -		while (*cp >= '0' && *cp <= '9')
   2.181 -			cp++;
   2.182 -		if (cp == cq || cp - cq > 3)
   2.183 -			break;
   2.184 -		if (*cp == '.' || octets == 3)
   2.185 -			octets++;
   2.186 -		if (octets < 4)
   2.187 -			cp++;
   2.188 -		cq = cp;
   2.189 -	}
   2.190 -	if (octets == 4 && (*cp == ':' || *cp == '\0')) {
   2.191 -		if (*cp == ':')
   2.192 -			*cp++ = '\0';
   2.193 -		root_server_addr = in_aton(name);
   2.194 -		strcpy(name, cp);
   2.195 -	}
   2.196 -}
   2.197 -
   2.198 -
   2.199 -/*
   2.200 - *  Parse option string.
   2.201 - */
   2.202 -static void __init root_nfs_parse(char *name, char *buf)
   2.203 -{
   2.204 -	char *options, *val, *cp;
   2.205 -
   2.206 -	if ((options = strchr(name, ','))) {
   2.207 -		*options++ = 0;
   2.208 -		cp = strtok(options, ",");
   2.209 -		while (cp) {
   2.210 -			if ((val = strchr(cp, '='))) {
   2.211 -				struct nfs_int_opts *opts = root_int_opts;
   2.212 -				*val++ = '\0';
   2.213 -				while (opts->name && strcmp(opts->name, cp))
   2.214 -					opts++;
   2.215 -				if (opts->name)
   2.216 -					*(opts->val) = (int) simple_strtoul(val, NULL, 10);
   2.217 -			} else {
   2.218 -				struct nfs_bool_opts *opts = root_bool_opts;
   2.219 -				while (opts->name && strcmp(opts->name, cp))
   2.220 -					opts++;
   2.221 -				if (opts->name) {
   2.222 -					nfs_data.flags &= opts->and_mask;
   2.223 -					nfs_data.flags |= opts->or_mask;
   2.224 -				}
   2.225 -			}
   2.226 -			cp = strtok(NULL, ",");
   2.227 -		}
   2.228 -	}
   2.229 -	if (name[0] && strcmp(name, "default")) {
   2.230 -		strncpy(buf, name, NFS_MAXPATHLEN-1);
   2.231 -		buf[NFS_MAXPATHLEN-1] = 0;
   2.232 -	}
   2.233 -}
   2.234 -
   2.235 -
   2.236 -/*
   2.237 - *  Prepare the NFS data structure and parse all options.
   2.238 - */
   2.239 -static int __init root_nfs_name(char *name)
   2.240 -{
   2.241 -	char buf[NFS_MAXPATHLEN];
   2.242 -	char *cp;
   2.243 -
   2.244 -	/* Set some default values */
   2.245 -	memset(&nfs_data, 0, sizeof(nfs_data));
   2.246 -	nfs_port          = -1;
   2.247 -	nfs_data.version  = NFS_MOUNT_VERSION;
   2.248 -	nfs_data.flags    = NFS_MOUNT_NONLM;	/* No lockd in nfs root yet */
   2.249 -	nfs_data.rsize    = NFS_DEF_FILE_IO_BUFFER_SIZE;
   2.250 -	nfs_data.wsize    = NFS_DEF_FILE_IO_BUFFER_SIZE;
   2.251 -	nfs_data.bsize	  = 0;
   2.252 -	nfs_data.timeo    = 7;
   2.253 -	nfs_data.retrans  = 3;
   2.254 -	nfs_data.acregmin = 3;
   2.255 -	nfs_data.acregmax = 60;
   2.256 -	nfs_data.acdirmin = 30;
   2.257 -	nfs_data.acdirmax = 60;
   2.258 -	strcpy(buf, NFS_ROOT);
   2.259 -
   2.260 -	/* Process options received from the remote server */
   2.261 -	root_nfs_parse(root_server_path, buf);
   2.262 -
   2.263 -	/* Override them by options set on kernel command-line */
   2.264 -	root_nfs_parse(name, buf);
   2.265 -
   2.266 -	cp = system_utsname.nodename;
   2.267 -	if (strlen(buf) + strlen(cp) > NFS_MAXPATHLEN) {
   2.268 -		printk(KERN_ERR "Root-NFS: Pathname for remote directory too long.\n");
   2.269 -		return -1;
   2.270 -	}
   2.271 -	sprintf(nfs_path, buf, cp);
   2.272 -
   2.273 -	return 1;
   2.274 -}
   2.275 -
   2.276 -
   2.277 -/*
   2.278 - *  Get NFS server address.
   2.279 - */
   2.280 -static int __init root_nfs_addr(void)
   2.281 -{
   2.282 -	if ((servaddr = root_server_addr) == INADDR_NONE) {
   2.283 -		printk(KERN_ERR "Root-NFS: No NFS server available, giving up.\n");
   2.284 -		return -1;
   2.285 -	}
   2.286 -
   2.287 -	strncpy(nfs_data.hostname, in_ntoa(servaddr), sizeof(nfs_data.hostname)-1);
   2.288 -	return 0;
   2.289 -}
   2.290 -
   2.291 -/*
   2.292 - *  Tell the user what's going on.
   2.293 - */
   2.294 -#ifdef NFSROOT_DEBUG
   2.295 -static void __init root_nfs_print(void)
   2.296 -{
   2.297 -	printk(KERN_NOTICE "Root-NFS: Mounting %s on server %s as root\n",
   2.298 -		nfs_path, nfs_data.hostname);
   2.299 -	printk(KERN_NOTICE "Root-NFS:     rsize = %d, wsize = %d, timeo = %d, retrans = %d\n",
   2.300 -		nfs_data.rsize, nfs_data.wsize, nfs_data.timeo, nfs_data.retrans);
   2.301 -	printk(KERN_NOTICE "Root-NFS:     acreg (min,max) = (%d,%d), acdir (min,max) = (%d,%d)\n",
   2.302 -		nfs_data.acregmin, nfs_data.acregmax,
   2.303 -		nfs_data.acdirmin, nfs_data.acdirmax);
   2.304 -	printk(KERN_NOTICE "Root-NFS:     nfsd port = %d, mountd port = %d, flags = %08x\n",
   2.305 -		nfs_port, mount_port, nfs_data.flags);
   2.306 -}
   2.307 -#endif
   2.308 -
   2.309 -
   2.310 -int __init root_nfs_init(void)
   2.311 -{
   2.312 -#ifdef NFSROOT_DEBUG
   2.313 -	nfs_debug |= NFSDBG_ROOT;
   2.314 -#endif
   2.315 -
   2.316 -	/*
   2.317 -	 * Decode the root directory path name and NFS options from
   2.318 -	 * the kernel command line. This has to go here in order to
   2.319 -	 * be able to use the client IP address for the remote root
   2.320 -	 * directory (necessary for pure RARP booting).
   2.321 -	 */
   2.322 -	if (root_nfs_name(nfs_root_name) < 0 ||
   2.323 -	    root_nfs_addr() < 0)
   2.324 -		return -1;
   2.325 -
   2.326 -#ifdef NFSROOT_DEBUG
   2.327 -	root_nfs_print();
   2.328 -#endif
   2.329 -
   2.330 -	return 0;
   2.331 -}
   2.332 -
   2.333 -
   2.334 -/*
   2.335 - *  Parse NFS server and directory information passed on the kernel
   2.336 - *  command line.
   2.337 - */
   2.338 -int __init nfs_root_setup(char *line)
   2.339 -{
   2.340 -	ROOT_DEV = MKDEV(UNNAMED_MAJOR, 255);
   2.341 -	if (line[0] == '/' || line[0] == ',' || (line[0] >= '0' && line[0] <= '9')) {
   2.342 -		strncpy(nfs_root_name, line, sizeof(nfs_root_name));
   2.343 -		nfs_root_name[sizeof(nfs_root_name)-1] = '\0';
   2.344 -	} else {
   2.345 -		int n = strlen(line) + strlen(NFS_ROOT);
   2.346 -		if (n >= sizeof(nfs_root_name))
   2.347 -			line[sizeof(nfs_root_name) - strlen(NFS_ROOT) - 1] = '\0';
   2.348 -		sprintf(nfs_root_name, NFS_ROOT, line);
   2.349 -	}
   2.350 -	root_nfs_parse_addr(nfs_root_name);
   2.351 -	return 1;
   2.352 -}
   2.353 -
   2.354 -__setup("nfsroot=", nfs_root_setup);
   2.355 -
   2.356 -/***************************************************************************
   2.357 -
   2.358 -	       Routines to actually mount the root directory
   2.359 -
   2.360 - ***************************************************************************/
   2.361 -
   2.362 -/*
   2.363 - *  Construct sockaddr_in from address and port number.
   2.364 - */
   2.365 -static inline void
   2.366 -set_sockaddr(struct sockaddr_in *sin, __u32 addr, __u16 port)
   2.367 -{
   2.368 -	sin->sin_family = AF_INET;
   2.369 -	sin->sin_addr.s_addr = addr;
   2.370 -	sin->sin_port = port;
   2.371 -}
   2.372 -
   2.373 -/*
   2.374 - *  Query server portmapper for the port of a daemon program.
   2.375 - */
   2.376 -static int __init root_nfs_getport(int program, int version, int proto)
   2.377 -{
   2.378 -	struct sockaddr_in sin;
   2.379 -
   2.380 -	printk(KERN_NOTICE "Looking up port of RPC %d/%d on %s\n",
   2.381 -		program, version, in_ntoa(servaddr));
   2.382 -	set_sockaddr(&sin, servaddr, 0);
   2.383 -	return rpc_getport_external(&sin, program, version, proto);
   2.384 -}
   2.385 -
   2.386 -
   2.387 -/*
   2.388 - *  Use portmapper to find mountd and nfsd port numbers if not overriden
   2.389 - *  by the user. Use defaults if portmapper is not available.
   2.390 - *  XXX: Is there any nfs server with no portmapper?
   2.391 - */
   2.392 -static int __init root_nfs_ports(void)
   2.393 -{
   2.394 -	int port;
   2.395 -	int nfsd_ver, mountd_ver;
   2.396 -	int nfsd_port, mountd_port;
   2.397 -	int proto;
   2.398 -
   2.399 -	if (nfs_data.flags & NFS_MOUNT_VER3) {
   2.400 -		nfsd_ver = NFS3_VERSION;
   2.401 -		mountd_ver = NFS_MNT3_VERSION;
   2.402 -		nfsd_port = NFS_PORT;
   2.403 -		mountd_port = NFS_MNT_PORT;
   2.404 -	} else {
   2.405 -		nfsd_ver = NFS2_VERSION;
   2.406 -		mountd_ver = NFS_MNT_VERSION;
   2.407 -		nfsd_port = NFS_PORT;
   2.408 -		mountd_port = NFS_MNT_PORT;
   2.409 -	}
   2.410 -
   2.411 -	proto = (nfs_data.flags & NFS_MOUNT_TCP) ? IPPROTO_TCP : IPPROTO_UDP;
   2.412 -
   2.413 -	if (nfs_port < 0) {
   2.414 -		if ((port = root_nfs_getport(NFS_PROGRAM, nfsd_ver, proto)) < 0) {
   2.415 -			printk(KERN_ERR "Root-NFS: Unable to get nfsd port "
   2.416 -					"number from server, using default\n");
   2.417 -			port = nfsd_port;
   2.418 -		}
   2.419 -		nfs_port = htons(port);
   2.420 -		dprintk("Root-NFS: Portmapper on server returned %d "
   2.421 -			"as nfsd port\n", port);
   2.422 -	}
   2.423 -
   2.424 -	if ((port = root_nfs_getport(NFS_MNT_PROGRAM, mountd_ver, proto)) < 0) {
   2.425 -		printk(KERN_ERR "Root-NFS: Unable to get mountd port "
   2.426 -				"number from server, using default\n");
   2.427 -		port = mountd_port;
   2.428 -	}
   2.429 -	mount_port = htons(port);
   2.430 -	dprintk("Root-NFS: mountd port is %d\n", port);
   2.431 -
   2.432 -	return 0;
   2.433 -}
   2.434 -
   2.435 -
   2.436 -/*
   2.437 - *  Get a file handle from the server for the directory which is to be
   2.438 - *  mounted.
   2.439 - */
   2.440 -static int __init root_nfs_get_handle(void)
   2.441 -{
   2.442 -	struct sockaddr_in sin;
   2.443 -	int status;
   2.444 -
   2.445 -	set_sockaddr(&sin, servaddr, mount_port);
   2.446 -	if (nfs_data.flags & NFS_MOUNT_VER3)
   2.447 -		status = nfs3_mount(&sin, nfs_path, &nfs_data.root);
   2.448 -	else
   2.449 -		status = nfs_mount(&sin, nfs_path, &nfs_data.root);
   2.450 -	if (status < 0)
   2.451 -		printk(KERN_ERR "Root-NFS: Server returned error %d "
   2.452 -				"while mounting %s\n", status, nfs_path);
   2.453 -
   2.454 -	return status;
   2.455 -}
   2.456 -
   2.457 -/*
   2.458 - *  Get the NFS port numbers and file handle, and return the prepared 'data'
   2.459 - *  argument for ->read_super() if everything went OK. Return NULL otherwise.
   2.460 - */
   2.461 -void * __init nfs_root_data(void)
   2.462 -{
   2.463 -	if (root_nfs_init() < 0
   2.464 -	 || root_nfs_ports() < 0
   2.465 -	 || root_nfs_get_handle() < 0)
   2.466 -		return NULL;
   2.467 -	set_sockaddr((struct sockaddr_in *) &nfs_data.addr, servaddr, nfs_port);
   2.468 -	return (void*)&nfs_data;
   2.469 -}