Subject: Re: NFS mount gives ENETDOWN in -git15

From: Trond Myklebust <[email-masked]>
Date: Sun, 22 Jul 2007 13:55:16 -0400

On Sat, 2007-07-21 at 15:31 +0200, Andi Kleen wrote:
> I tried to mount another nfs mount on a system running with nfsroot.
> But I get
> 
> # mount basil:/home /basil/home/
> mount: Network is down
> 
> The network is not down of course, the system is happily running with nfs root from that
> server. Userland is older SUSE 10.0

Does Al's patch help in any way?

Cheers
  Trond

Subject: [PATCH] fix broken handling of port=... in NFS option parsing
From: Al Viro <[email-masked]>
To: Linus Torvalds <[email-masked]>
Cc: Chuck Lever <[email-masked]>, Trond Myklebust <[email-masked]>, [email-masked]
Date: Sun, 22 Jul 2007 10:59:06 +0100

	Obviously broken on little-endian; fortunately, the option is
not frequently used...

Signed-off-by: Al Viro <[email-masked]>
---
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index b34b7a7..b2a851c 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -732,7 +732,7 @@ static int nfs_parse_mount_options(char *raw,
 				return 0;
 			if (option < 0 || option > 65535)
 				return 0;
-			mnt->nfs_server.address.sin_port = htonl(option);
+			mnt->nfs_server.address.sin_port = htons(option);
 			break;
 		case Opt_rsize:
 			if (match_int(args, &mnt->rsize))