[PATCH] knfsd: hide use of lockd's h_monitored flag

This patch moves all checks of the h_monitored flag into the
nsm_monitor/unmonitor functions.  A subsequent patch will replace the
mechanism by which we mark a host as being monitored.

There is still one occurence of h_monitored outside of mon.c and that is in
clntlock.c where we respond to a reboot.  The subsequent patch will modify
this too.

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>
diff --git a/fs/lockd/host.c b/fs/lockd/host.c
index a0d0b58..637ec95 100644
--- a/fs/lockd/host.c
+++ b/fs/lockd/host.c
@@ -331,9 +331,12 @@
 			}
 			dprintk("lockd: delete host %s\n", host->h_name);
 			*q = host->h_next;
-			/* Don't unmonitor hosts that have been invalidated */
-			if (host->h_monitored && !host->h_killed)
-				nsm_unmonitor(host);
+
+			/*
+			 * Unmonitor unless host was invalidated (i.e. lockd restarted)
+			 */
+			nsm_unmonitor(host);
+
 			if ((clnt = host->h_rpcclnt) != NULL) {
 				if (atomic_read(&clnt->cl_users)) {
 					printk(KERN_WARNING