diff --git a/fs/nfs/super.c b/fs/nfs/super.c index fda1635dd1336779cff5181eac91ccf659fea951..7d84d94fa827f4ecb386ad85c87df315658e2cd7 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 *) &args->nfs_server.address)) return -EINVAL;