NFS: Use super.c for NFSROOT mount option parsing
Replace duplicate code in NFSROOT for mounting an NFS server on '/' with logic that uses the existing mainline text-based logic in the NFS client. Add documenting comments where appropriate. Note that this means NFSROOT mounts now use the same default settings as v2/v3 mounts done via mount(2) from user space. vers=3,tcp,rsize=<negotiated default>,wsize=<negotiated default> As before, however, no version/protocol negotiation with the server is done. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
committed by
Trond Myklebust
parent
60ac03685b
commit
56463e50d1
+6
-6
@@ -291,13 +291,13 @@ out:
|
||||
#ifdef CONFIG_ROOT_NFS
|
||||
static int __init mount_nfs_root(void)
|
||||
{
|
||||
void *data = nfs_root_data();
|
||||
char *root_dev, *root_data;
|
||||
|
||||
create_dev("/dev/root", ROOT_DEV);
|
||||
if (data &&
|
||||
do_mount_root("/dev/root", "nfs", root_mountflags, data) == 0)
|
||||
return 1;
|
||||
return 0;
|
||||
if (nfs_root_data(&root_dev, &root_data) != 0)
|
||||
return 0;
|
||||
if (do_mount_root(root_dev, "nfs", root_mountflags, root_data) != 0)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user