[PATCH 04/14] NSM: Move NSM-related function and variable declarations to lockd.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Clean up: Keep the NSM function declarations together with the
declarations already in lockd.h, and modernize the documenting
comments.

Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx>
---

 fs/lockd/mon.c                 |   18 ++++++++++--------
 include/linux/lockd/lockd.h    |    4 ++++
 include/linux/lockd/sm_inter.h |    4 ----
 3 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c
index 1c058b1..d48ae14 100644
--- a/fs/lockd/mon.c
+++ b/fs/lockd/mon.c
@@ -159,11 +159,12 @@ void nsm_release(struct nsm_handle *nsm)
 	}
 }
 
-/*
- * Set up monitoring of a remote host
+/**
+ * nsm_monitor - Set up monitoring of a remote host
+ * @host: pointer to nlm_host representing remote peer to monitor
+ *
  */
-int
-nsm_monitor(struct nlm_host *host)
+int nsm_monitor(struct nlm_host *host)
 {
 	struct nsm_handle *nsm = host->h_nsmhandle;
 	struct nsm_res	res;
@@ -184,11 +185,12 @@ nsm_monitor(struct nlm_host *host)
 	return status;
 }
 
-/*
- * Cease to monitor remote host
+/**
+ * nsm_unmonitor - Cease to monitor remote host
+ * @host: pointer to nlm_host representing remote peer to stop monitoring
+ *
  */
-int
-nsm_unmonitor(struct nlm_host *host)
+int nsm_unmonitor(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 a45be5d..6dc1043 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -200,7 +200,9 @@ extern struct svc_procedure	nlmsvc_procedures4[];
 #endif
 extern int			nlmsvc_grace_period;
 extern unsigned long		nlmsvc_timeout;
+
 extern int			nsm_use_hostnames;
+extern int			nsm_local_state;
 
 /*
  * Lockd client functions
@@ -247,6 +249,8 @@ struct nsm_handle *nsm_find(const struct sockaddr *sap, const size_t salen,
 					const size_t hostname_len,
 					const int create);
 void		  nsm_release(struct nsm_handle *nsm);
+int		  nsm_monitor(struct nlm_host *host);
+int		  nsm_unmonitor(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 5a5448b..f75d3ea 100644
--- a/include/linux/lockd/sm_inter.h
+++ b/include/linux/lockd/sm_inter.h
@@ -41,8 +41,4 @@ struct nsm_res {
 	u32		state;
 };
 
-int		nsm_monitor(struct nlm_host *);
-int		nsm_unmonitor(struct nlm_host *);
-extern int	nsm_local_state;
-
 #endif /* LINUX_LOCKD_SM_INTER_H */

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux