]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
fix broken handling of port=... in NFS option parsing
authorAl Viro <viro@ftp.linux.org.uk>
Sun, 22 Jul 2007 09:59:06 +0000 (10:59 +0100)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 22 Jul 2007 18:15:18 +0000 (11:15 -0700)
Obviously broken on little-endian; fortunately, the option is not
frequently used...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[ Hey, sparse is wonderful, but even better than sparse is having people
  like Al that actually _run_ it and fix bugs using it.    - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/nfs/super.c

index b34b7a711d5b6e3e7f8280b71ee26940523f0eaf..b2a851c1b8cb0230a59a2dfef0a2dd77f9c9593d 100644 (file)
@@ -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))