aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/lockd/mon.c15
-rw-r--r--include/linux/lockd/lockd.h1
-rw-r--r--include/linux/lockd/sm_inter.h1
3 files changed, 10 insertions, 7 deletions
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c
index 15fab22db028..d61cdc61cb50 100644
--- a/fs/lockd/mon.c
+++ b/fs/lockd/mon.c
@@ -107,15 +107,19 @@ int nsm_monitor(const struct nlm_host *host)
107 return status; 107 return status;
108} 108}
109 109
110/* 110/**
111 * Cease to monitor remote host 111 * nsm_unmonitor - Unregister peer notification
112 * @host: pointer to nlm_host of peer to stop monitoring
113 *
114 * If this peer is monitored, this function sends an upcall to
115 * tell the local rpc.statd not to send this peer a notification
116 * when we reboot.
112 */ 117 */
113int 118void nsm_unmonitor(const struct nlm_host *host)
114nsm_unmonitor(struct nlm_host *host)
115{ 119{
116 struct nsm_handle *nsm = host->h_nsmhandle; 120 struct nsm_handle *nsm = host->h_nsmhandle;
117 struct nsm_res res; 121 struct nsm_res res;
118 int status = 0; 122 int status;
119 123
120 if (atomic_read(&nsm->sm_count) == 1 124 if (atomic_read(&nsm->sm_count) == 1
121 && nsm->sm_monitored && !nsm->sm_sticky) { 125 && nsm->sm_monitored && !nsm->sm_sticky) {
@@ -128,7 +132,6 @@ nsm_unmonitor(struct nlm_host *host)
128 else 132 else
129 nsm->sm_monitored = 0; 133 nsm->sm_monitored = 0;
130 } 134 }
131 return status;
132} 135}
133 136
134/* 137/*
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
index 30a6a9c1ce42..38344bfb814a 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -245,6 +245,7 @@ extern void nlm_host_rebooted(const struct sockaddr_in *, const char *,
245 * Host monitoring 245 * Host monitoring
246 */ 246 */
247int nsm_monitor(const struct nlm_host *host); 247int nsm_monitor(const struct nlm_host *host);
248void nsm_unmonitor(const struct nlm_host *host);
248 249
249/* 250/*
250 * This is used in garbage collection and resource reclaim 251 * This is used in garbage collection and resource reclaim
diff --git a/include/linux/lockd/sm_inter.h b/include/linux/lockd/sm_inter.h
index 546b6102b0d7..896a5e303323 100644
--- a/include/linux/lockd/sm_inter.h
+++ b/include/linux/lockd/sm_inter.h
@@ -41,7 +41,6 @@ struct nsm_res {
41 u32 state; 41 u32 state;
42}; 42};
43 43
44int nsm_unmonitor(struct nlm_host *);
45extern int nsm_local_state; 44extern int nsm_local_state;
46 45
47#endif /* LINUX_LOCKD_SM_INTER_H */ 46#endif /* LINUX_LOCKD_SM_INTER_H */