diff options
author | Olaf Kirch <okir@suse.de> | 2006-10-04 02:15:52 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-04 07:55:16 -0700 |
commit | db4e4c9a9e741ee812e1febf5e386d6a24218a71 (patch) | |
tree | 92e59fba30edbf5e10908eb2952928a5e2a29adf /fs/lockd/svclock.c | |
parent | cf712c24d72341effcfd28330b83b49f77cb627b (diff) | |
download | linux-3.10-db4e4c9a9e741ee812e1febf5e386d6a24218a71.tar.gz linux-3.10-db4e4c9a9e741ee812e1febf5e386d6a24218a71.tar.bz2 linux-3.10-db4e4c9a9e741ee812e1febf5e386d6a24218a71.zip |
[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.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |