summaryrefslogtreecommitdiffstats
path: root/fs/lockd/svcproc.c
diff options
context:
space:
mode:
authorOlaf Kirch <okir@suse.de>2006-10-04 02:15:52 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 07:55:16 -0700
commitdb4e4c9a9e741ee812e1febf5e386d6a24218a71 (patch)
tree92e59fba30edbf5e10908eb2952928a5e2a29adf /fs/lockd/svcproc.c
parentcf712c24d72341effcfd28330b83b49f77cb627b (diff)
downloadop-kernel-dev-db4e4c9a9e741ee812e1febf5e386d6a24218a71.zip
op-kernel-dev-db4e4c9a9e741ee812e1febf5e386d6a24218a71.tar.gz
[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/svcproc.c')
-rw-r--r--fs/lockd/svcproc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/lockd/svcproc.c b/fs/lockd/svcproc.c
index 452eb5e..12291ab 100644
--- a/fs/lockd/svcproc.c
+++ b/fs/lockd/svcproc.c
@@ -66,7 +66,7 @@ nlmsvc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,
return nlm_lck_denied_nolocks;
/* Obtain host handle */
- if (!(host = nlmsvc_lookup_host(rqstp))
+ if (!(host = nlmsvc_lookup_host(rqstp, lock->caller, lock->len))
|| (argp->monitor && nsm_monitor(host) < 0))
goto no_locks;
*hostp = host;
@@ -287,7 +287,9 @@ static int nlmsvc_callback(struct svc_rqst *rqstp, u32 proc, struct nlm_args *ar
struct nlm_rqst *call;
int stat;
- host = nlmsvc_lookup_host(rqstp);
+ host = nlmsvc_lookup_host(rqstp,
+ argp->lock.caller,
+ argp->lock.len);
if (host == NULL)
return rpc_system_err;
OpenPOWER on IntegriCloud