mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 28/29] nfsroot port= parameter fix [backport of 2.4 fix]
@ 2006-02-08  3:20 Al Viro
  0 siblings, 0 replies; only message in thread
From: Al Viro @ 2006-02-08  3:20 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel

Date: 1136357057 -0500

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>

---

 fs/nfs/nfsroot.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

8854eddbdb3e45b8d381ecff2937a942d0cb2067
diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c
index e897e00..c0a754e 100644
--- a/fs/nfs/nfsroot.c
+++ b/fs/nfs/nfsroot.c
@@ -465,10 +465,11 @@ static int __init root_nfs_ports(void)
 					"number from server, using default\n");
 			port = nfsd_port;
 		}
-		nfs_port = htons(port);
+		nfs_port = port;
 		dprintk("Root-NFS: Portmapper on server returned %d "
 			"as nfsd port\n", port);
 	}
+	nfs_port = htons(nfs_port);
 
 	if ((port = root_nfs_getport(NFS_MNT_PROGRAM, mountd_ver, proto)) < 0) {
 		printk(KERN_ERR "Root-NFS: Unable to get mountd port "
-- 
0.99.9.GIT


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-02-08  3:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-08  3:20 [PATCH 28/29] nfsroot port= parameter fix [backport of 2.4 fix] Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®