aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/host.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2008-09-03 14:36:01 -0400
committerJ. Bruce Fields <bfields@citi.umich.edu>2008-09-29 18:13:39 -0400
commit781b61a6f4ff94cb8c14cf598b547f5d5c490969 (patch)
tree166288be121563b77c3672b311bbbe2541de3bd3 /fs/lockd/host.c
parent7e9d7746bfd40121438b155023793796499497d8 (diff)
lockd: Teach nlm_cmp_addr() to support AF_INET6 addresses
Update the nlm_cmp_addr() helper to support AF_INET6 as well as AF_INET addresses. New version takes two "struct sockaddr *" arguments instead of "struct sockaddr_in *" arguments. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/lockd/host.c')
-rw-r--r--fs/lockd/host.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/lockd/host.c b/fs/lockd/host.c
index 510ebcf485f0..dbf3fe620a0c 100644
--- a/fs/lockd/host.c
+++ b/fs/lockd/host.c
@@ -116,7 +116,7 @@ static struct nlm_host *nlm_lookup_host(int server,
116 */ 116 */
117 chain = &nlm_hosts[hash]; 117 chain = &nlm_hosts[hash];
118 hlist_for_each_entry(host, pos, chain, h_hash) { 118 hlist_for_each_entry(host, pos, chain, h_hash) {
119 if (!nlm_cmp_addr(nlm_addr_in(host), sin)) 119 if (!nlm_cmp_addr(nlm_addr(host), (struct sockaddr *)sin))
120 continue; 120 continue;
121 121
122 /* See if we have an NSM handle for this client */ 122 /* See if we have an NSM handle for this client */
@@ -129,7 +129,7 @@ static struct nlm_host *nlm_lookup_host(int server,
129 continue; 129 continue;
130 if (host->h_server != server) 130 if (host->h_server != server)
131 continue; 131 continue;
132 if (!nlm_cmp_addr(nlm_srcaddr_in(host), ssin)) 132 if (!nlm_cmp_addr(nlm_srcaddr(host), (struct sockaddr *)ssin))
133 continue; 133 continue;
134 134
135 /* Move to head of hash chain. */ 135 /* Move to head of hash chain. */
@@ -551,7 +551,7 @@ retry:
551 if (strlen(pos->sm_name) != hostname_len 551 if (strlen(pos->sm_name) != hostname_len
552 || memcmp(pos->sm_name, hostname, hostname_len)) 552 || memcmp(pos->sm_name, hostname, hostname_len))
553 continue; 553 continue;
554 } else if (!nlm_cmp_addr(nsm_addr_in(pos), sin)) 554 } else if (!nlm_cmp_addr(nsm_addr(pos), (struct sockaddr *)sin))
555 continue; 555 continue;
556 atomic_inc(&pos->sm_count); 556 atomic_inc(&pos->sm_count);
557 kfree(nsm); 557 kfree(nsm);