Commit:     0eb2574121ef0ffbebe5335c66c227d1b987fa25
Parent:     28c494c5c8d425e15b7b82571e4df6d6bc34594d
Author:     Chuck Lever <[EMAIL PROTECTED]>
AuthorDate: Fri Oct 26 13:32:19 2007 -0400
Committer:  Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 02:05:45 2008 -0500

    NFS: Ensure that NFS version 4 mounts use NFS_PORT if nfsport wasn't set
    Text-based mount option parsing introduced a minor regression in the
    behavior of NFS version 4 mounts.  NFS version 4 is not supposed to require
    a running rpcbind service on the server in order for a mount to succeed.
    In other words, if the mount options don't specify a port number, the port
    number is supposed to default to 2049.  For earlier versions of NFS, the
    default port number was zero in order to cause the RPC client to autobind
    to the server's NFS service.
    Signed-off-by: Chuck Lever <[EMAIL PROTECTED]>
    Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]>
 fs/nfs/super.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index fda1635..7d84d94 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -1643,6 +1643,8 @@ static int nfs4_validate_mount_data(void *options,
                if (nfs_parse_mount_options((char *)options, args) == 0)
                        return -EINVAL;
+               if (args->nfs_server.address.sin_port == 0)
+                       args->nfs_server.address.sin_port = htons(NFS_PORT);
                if (!nfs_verify_server_address((struct sockaddr *)
                        return -EINVAL;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to