diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2010-09-17 10:54:37 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2010-09-17 10:54:37 -0400 |
commit | 56463e50d1fc3f070492434cea6303b35ea000de (patch) | |
tree | 889f492ebe064c0f7b2b9bb759c13767b4d234d1 /init/do_mounts.c | |
parent | 60ac03685bf513f9d9b6e8e098018b35309ed326 (diff) |
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>
Diffstat (limited to 'init/do_mounts.c')
-rw-r--r-- | init/do_mounts.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/init/do_mounts.c b/init/do_mounts.c index 02e3ca4fc527..52387f14f9b4 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c | |||
@@ -291,13 +291,13 @@ out: | |||
291 | #ifdef CONFIG_ROOT_NFS | 291 | #ifdef CONFIG_ROOT_NFS |
292 | static int __init mount_nfs_root(void) | 292 | static int __init mount_nfs_root(void) |
293 | { | 293 | { |
294 | void *data = nfs_root_data(); | 294 | char *root_dev, *root_data; |
295 | 295 | ||
296 | create_dev("/dev/root", ROOT_DEV); | 296 | if (nfs_root_data(&root_dev, &root_data) != 0) |
297 | if (data && | 297 | return 0; |
298 | do_mount_root("/dev/root", "nfs", root_mountflags, data) == 0) | 298 | if (do_mount_root(root_dev, "nfs", root_mountflags, root_data) != 0) |
299 | return 1; | 299 | return 0; |
300 | return 0; | 300 | return 1; |
301 | } | 301 | } |
302 | #endif | 302 | #endif |
303 | 303 | ||