summaryrefslogtreecommitdiff
path: root/fs/nfs/client.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2008-12-23 20:21:38 (GMT)
committerTrond Myklebust <Trond.Myklebust@netapp.com>2008-12-23 20:21:38 (GMT)
commit0cb2659b818eca99235e17c04291cfa9985c14f7 (patch)
tree48fc176e1e1e8a6f771e664799c26df1d72e9f69 /fs/nfs/client.c
parent50a737f86dbf99daf3a8dcbdf778a3be36bb2a39 (diff)
downloadlinux-fsl-qoriq-0cb2659b818eca99235e17c04291cfa9985c14f7.tar.xz
NLM: allow lockd requests from an unprivileged port
If the admin has specified the "noresvport" option for an NFS mount point, the kernel's NFS client uses an unprivileged source port for the main NFS transport. The kernel's lockd client should use an unprivileged port in this case as well. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r--fs/nfs/client.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 3a69cac..70b6d9e 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -526,6 +526,8 @@ static int nfs_start_lockd(struct nfs_server *server)
.protocol = server->flags & NFS_MOUNT_TCP ?
IPPROTO_TCP : IPPROTO_UDP,
.nfs_version = clp->rpc_ops->version,
+ .noresvport = server->flags & NFS_MOUNT_NORESVPORT ?
+ 1 : 0,
};
if (nlm_init.nfs_version > 3)