aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/lockd/mon.c15
-rw-r--r--include/linux/lockd/lockd.h4
-rw-r--r--include/linux/lockd/sm_inter.h1
3 files changed, 15 insertions, 5 deletions
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c
index 07e16b81498..aaaa08e7ae7 100644
--- a/fs/lockd/mon.c
+++ b/fs/lockd/mon.c
@@ -69,11 +69,18 @@ nsm_mon_unmon(struct nsm_handle *nsm, u32 proc, struct nsm_res *res)
return status;
}
-/*
- * Set up monitoring of a remote host
+/**
+ * nsm_monitor - Notify a peer in case we reboot
+ * @host: pointer to nlm_host of peer to notify
+ *
+ * If this peer is not already monitored, this function sends an
+ * upcall to the local rpc.statd to record the name/address of
+ * the peer to notify in case we reboot.
+ *
+ * Returns zero if the peer is monitored by the local rpc.statd;
+ * otherwise a negative errno value is returned.
*/
-int
-nsm_monitor(struct nlm_host *host)
+int nsm_monitor(const struct nlm_host *host)
{
struct nsm_handle *nsm = host->h_nsmhandle;
struct nsm_res res;
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
index d3c7247d23e..f15a4f5ccbf 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -242,6 +242,10 @@ extern void nlm_host_rebooted(const struct sockaddr_in *, const char *,
unsigned int, u32);
void nsm_release(struct nsm_handle *);
+/*
+ * Host monitoring
+ */
+int nsm_monitor(const struct nlm_host *host);
/*
* 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 5a5448bdb17..546b6102b0d 100644
--- a/include/linux/lockd/sm_inter.h
+++ b/include/linux/lockd/sm_inter.h
@@ -41,7 +41,6 @@ struct nsm_res {
u32 state;
};
-int nsm_monitor(struct nlm_host *);
int nsm_unmonitor(struct nlm_host *);
extern int nsm_local_state;