aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/clntlock.c
diff options
context:
space:
mode:
authorOlaf Kirch <okir@suse.de>2006-10-04 05:15:53 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 10:55:16 -0400
commit8dead0dbd478f35fd943f3719591e5af1ac0950d (patch)
tree05ad7dd248263cbeecc4f3d0b4cbb3ec06c65626 /fs/lockd/clntlock.c
parentdb4e4c9a9e741ee812e1febf5e386d6a24218a71 (diff)
[PATCH] knfsd: lockd: introduce nsm_handle
This patch introduces the nsm_handle, which is shared by all nlm_host objects referring to the same client. With this patch applied, all nlm_hosts from the same address will share the same nsm_handle. A future patch will add sharing by name. Note: this patch changes h_name so that it is no longer guaranteed to be an IP address of the host. When the host represents an NFS server, h_name will be the name passed in the mount call. When the host represents a client, h_name will be the name presented in the lock request received from the client. A h_name is only used for printing informational messages, this change should not be significant. 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/clntlock.c')
-rw-r--r--fs/lockd/clntlock.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c
index 87e1d03e8267..54e63ddef043 100644
--- a/fs/lockd/clntlock.c
+++ b/fs/lockd/clntlock.c
@@ -150,7 +150,8 @@ u32 nlmclnt_grant(const struct sockaddr_in *addr, const struct nlm_lock *lock)
150static void nlmclnt_prepare_reclaim(struct nlm_host *host) 150static void nlmclnt_prepare_reclaim(struct nlm_host *host)
151{ 151{
152 down_write(&host->h_rwsem); 152 down_write(&host->h_rwsem);
153 host->h_monitored = 0; 153 if (host->h_nsmhandle)
154 host->h_nsmhandle->sm_monitored = 0;
154 host->h_state++; 155 host->h_state++;
155 host->h_nextrebind = 0; 156 host->h_nextrebind = 0;
156 nlm_rebind_host(host); 157 nlm_rebind_host(host);