summaryrefslogtreecommitdiff
path: root/fs/lockd/host.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2009-08-10 21:45:50 (GMT)
committerTrond Myklebust <Trond.Myklebust@netapp.com>2009-08-10 21:45:50 (GMT)
commit976a6f921cad26651d25e73826c05c7a023f5fa4 (patch)
treeb06e283e3fe342bcf444328390b211bb155fd9dc /fs/lockd/host.c
parente576e05a73bc1a00cdf56630942dbada1bf280a1 (diff)
parentc05988cdb06237738d361ef82fbf4df1020aa3db (diff)
downloadlinux-fsl-qoriq-976a6f921cad26651d25e73826c05c7a023f5fa4.tar.xz
Merge branch 'patches_cel-for-2.6.32' into nfs-for-2.6.32
Diffstat (limited to 'fs/lockd/host.c')
-rw-r--r--fs/lockd/host.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/fs/lockd/host.c b/fs/lockd/host.c
index 99d737b..7cb076a 100644
--- a/fs/lockd/host.c
+++ b/fs/lockd/host.c
@@ -87,18 +87,6 @@ static unsigned int nlm_hash_address(const struct sockaddr *sap)
return hash & (NLM_HOST_NRHASH - 1);
}
-static void nlm_clear_port(struct sockaddr *sap)
-{
- switch (sap->sa_family) {
- case AF_INET:
- ((struct sockaddr_in *)sap)->sin_port = 0;
- break;
- case AF_INET6:
- ((struct sockaddr_in6 *)sap)->sin6_port = 0;
- break;
- }
-}
-
/*
* Common host lookup routine for server & client
*/
@@ -177,7 +165,7 @@ static struct nlm_host *nlm_lookup_host(struct nlm_lookup_host_info *ni)
host->h_addrbuf = nsm->sm_addrbuf;
memcpy(nlm_addr(host), ni->sap, ni->salen);
host->h_addrlen = ni->salen;
- nlm_clear_port(nlm_addr(host));
+ rpc_set_port(nlm_addr(host), 0);
memcpy(nlm_srcaddr(host), ni->src_sap, ni->src_len);
host->h_version = ni->version;
host->h_proto = ni->protocol;