From: Al Viro Date: Wed, 4 Jan 2006 06:44:17 +0000 (-0500) Subject: [PATCH] nfsroot port= parameter fix [backport of 2.4 fix] X-Git-Tag: v2.6.16-rc3~69 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8854eddbdb3e45b8d381ecff2937a942d0cb2067;p=linux-2.6-omap-h63xx.git [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: When I specify the NFS port for nfsroot (e.g., nfsroot=,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 Patch got applied in 2.4.21-pre6. Author: Eric Lammerts (, AFAICS). Signed-off-by: Al Viro --- diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c index e897e00c2c9..c0a754ecdee 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 "