diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-01-04 01:44:17 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2006-02-07 21:00:42 -0500 |
commit | 8854eddbdb3e45b8d381ecff2937a942d0cb2067 (patch) | |
tree | 25e8a0d272ed0edadb13b00e271d9933b8df34fa /fs | |
parent | cc59853b4a9973126e15e0e6bdddf0627d4b99c4 (diff) |
[PATCH] nfsroot port= parameter fix [backport of 2.4 fix]
Direct backport of 2.4 fix that didn't get propagated to 2.6; original
comment follows:
<quote>
When I specify the NFS port for nfsroot (e.g.,
nfsroot=<dir>,port=2049), the
kernel uses the wrong port. In my case it tries to use 264 (0x108)
instead
of 2049 (0x801).
This patch adds the missing htons().
Eric
</quote>
Patch got applied in 2.4.21-pre6. Author: Eric Lammerts (<eric@lammerts.org>,
AFAICS).
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfsroot.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c index e897e00c2c9d..c0a754ecdee6 100644 --- a/fs/nfs/nfsroot.c +++ b/fs/nfs/nfsroot.c | |||
@@ -465,10 +465,11 @@ static int __init root_nfs_ports(void) | |||
465 | "number from server, using default\n"); | 465 | "number from server, using default\n"); |
466 | port = nfsd_port; | 466 | port = nfsd_port; |
467 | } | 467 | } |
468 | nfs_port = htons(port); | 468 | nfs_port = port; |
469 | dprintk("Root-NFS: Portmapper on server returned %d " | 469 | dprintk("Root-NFS: Portmapper on server returned %d " |
470 | "as nfsd port\n", port); | 470 | "as nfsd port\n", port); |
471 | } | 471 | } |
472 | nfs_port = htons(nfs_port); | ||
472 | 473 | ||
473 | if ((port = root_nfs_getport(NFS_MNT_PROGRAM, mountd_ver, proto)) < 0) { | 474 | if ((port = root_nfs_getport(NFS_MNT_PROGRAM, mountd_ver, proto)) < 0) { |
474 | printk(KERN_ERR "Root-NFS: Unable to get mountd port " | 475 | printk(KERN_ERR "Root-NFS: Unable to get mountd port " |