From db4e4c9a9e741ee812e1febf5e386d6a24218a71 Mon Sep 17 00:00:00 2001 From: Olaf Kirch Date: Wed, 4 Oct 2006 02:15:52 -0700 Subject: [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 Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/lockd/svclock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fs/lockd/svclock.c') diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index 93c00ee7189..3127ae9e435 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, struct nlm_rqst *call = NULL; /* Create host handle for callback */ - host = nlmsvc_lookup_host(rqstp); + host = nlmsvc_lookup_host(rqstp, lock->caller, lock->len); if (host == NULL) return NULL; @@ -451,6 +451,7 @@ nlmsvc_testlock(struct nlm_file *file, struct nlm_lock *lock, (long long)conflock->fl.fl_start, (long long)conflock->fl.fl_end); conflock->caller = "somehost"; /* FIXME */ + conflock->len = strlen(conflock->caller); conflock->oh.len = 0; /* don't return OH info */ conflock->svid = conflock->fl.fl_pid; return nlm_lck_denied; -- cgit v1.2.3