diff options
author | Olaf Kirch <okir@suse.de> | 2006-10-04 05:15:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-04 10:55:16 -0400 |
commit | db4e4c9a9e741ee812e1febf5e386d6a24218a71 (patch) | |
tree | 92e59fba30edbf5e10908eb2952928a5e2a29adf /fs/lockd/clntproc.c | |
parent | cf712c24d72341effcfd28330b83b49f77cb627b (diff) |
[PATCH] knfsd: when looking up a lockd host, pass hostname & length
This patch adds the peer's hostname (and name length) to all calls to
nlm*_lookup_host functions. A subsequent patch will make use of these (is
requested by a sysctl).
Signed-off-by: Olaf Kirch <okir@suse.de>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/lockd/clntproc.c')
-rw-r--r-- | fs/lockd/clntproc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c index 5436be623e30..7e6f22e2a3b4 100644 --- a/fs/lockd/clntproc.c +++ b/fs/lockd/clntproc.c | |||
@@ -153,6 +153,7 @@ nlmclnt_proc(struct inode *inode, int cmd, struct file_lock *fl) | |||
153 | { | 153 | { |
154 | struct rpc_clnt *client = NFS_CLIENT(inode); | 154 | struct rpc_clnt *client = NFS_CLIENT(inode); |
155 | struct sockaddr_in addr; | 155 | struct sockaddr_in addr; |
156 | struct nfs_server *nfssrv = NFS_SERVER(inode); | ||
156 | struct nlm_host *host; | 157 | struct nlm_host *host; |
157 | struct nlm_rqst *call; | 158 | struct nlm_rqst *call; |
158 | sigset_t oldset; | 159 | sigset_t oldset; |
@@ -166,7 +167,9 @@ nlmclnt_proc(struct inode *inode, int cmd, struct file_lock *fl) | |||
166 | } | 167 | } |
167 | 168 | ||
168 | rpc_peeraddr(client, (struct sockaddr *) &addr, sizeof(addr)); | 169 | rpc_peeraddr(client, (struct sockaddr *) &addr, sizeof(addr)); |
169 | host = nlmclnt_lookup_host(&addr, client->cl_xprt->prot, vers); | 170 | host = nlmclnt_lookup_host(&addr, client->cl_xprt->prot, vers, |
171 | nfssrv->nfs_client->cl_hostname, | ||
172 | strlen(nfssrv->nfs_client->cl_hostname)); | ||
170 | if (host == NULL) | 173 | if (host == NULL) |
171 | return -ENOLCK; | 174 | return -ENOLCK; |
172 | 175 | ||