aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/svclock.c
diff options
context:
space:
mode:
authorOlaf Kirch <okir@suse.de>2006-10-04 05:15:52 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 10:55:16 -0400
commitdb4e4c9a9e741ee812e1febf5e386d6a24218a71 (patch)
tree92e59fba30edbf5e10908eb2952928a5e2a29adf /fs/lockd/svclock.c
parentcf712c24d72341effcfd28330b83b49f77cb627b (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/svclock.c')
-rw-r--r--fs/lockd/svclock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
index 93c00ee7189d..3127ae9e435c 100644
--- a/fs/lockd/svclock.c
+++ b/fs/lockd/svclock.c
@@ -179,7 +179,7 @@ nlmsvc_create_block(struct svc_rqst *rqstp, struct nlm_file *file,
179 struct nlm_rqst *call = NULL; 179 struct nlm_rqst *call = NULL;
180 180
181 /* Create host handle for callback */ 181 /* Create host handle for callback */
182 host = nlmsvc_lookup_host(rqstp); 182 host = nlmsvc_lookup_host(rqstp, lock->caller, lock->len);
183 if (host == NULL) 183 if (host == NULL)
184 return NULL; 184 return NULL;
185 185
@@ -451,6 +451,7 @@ nlmsvc_testlock(struct nlm_file *file, struct nlm_lock *lock,
451 (long long)conflock->fl.fl_start, 451 (long long)conflock->fl.fl_start,
452 (long long)conflock->fl.fl_end); 452 (long long)conflock->fl.fl_end);
453 conflock->caller = "somehost"; /* FIXME */ 453 conflock->caller = "somehost"; /* FIXME */
454 conflock->len = strlen(conflock->caller);
454 conflock->oh.len = 0; /* don't return OH info */ 455 conflock->oh.len = 0; /* don't return OH info */
455 conflock->svid = conflock->fl.fl_pid; 456 conflock->svid = conflock->fl.fl_pid;
456 return nlm_lck_denied; 457 return nlm_lck_denied;