]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
NLM: Move the public declaration of nsm_unmonitor() to lockd.h
authorChuck Lever <chuck.lever@oracle.com>
Thu, 4 Dec 2008 19:21:38 +0000 (14:21 -0500)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Tue, 6 Jan 2009 16:53:52 +0000 (11:53 -0500)
Clean up.

Make the nlm_host argument "const," and move the public declaration to
lockd.h.  Add a documenting comment.

Bruce observed that nsm_unmonitor()'s only caller doesn't care about
its return code, so make nsm_unmonitor() return void.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
fs/lockd/mon.c
include/linux/lockd/lockd.h
include/linux/lockd/sm_inter.h

index 15fab22db0285872ad2307ab3af112f2214716f2..d61cdc61cb50686040e90d06df8036a0b0f19aa4 100644 (file)
@@ -107,15 +107,19 @@ int nsm_monitor(const struct nlm_host *host)
        return status;
 }
 
-/*
- * Cease to monitor remote host
+/**
+ * nsm_unmonitor - Unregister peer notification
+ * @host: pointer to nlm_host of peer to stop monitoring
+ *
+ * If this peer is monitored, this function sends an upcall to
+ * tell the local rpc.statd not to send this peer a notification
+ * when we reboot.
  */
-int
-nsm_unmonitor(struct nlm_host *host)
+void nsm_unmonitor(const struct nlm_host *host)
 {
        struct nsm_handle *nsm = host->h_nsmhandle;
        struct nsm_res  res;
-       int             status = 0;
+       int status;
 
        if (atomic_read(&nsm->sm_count) == 1
         && nsm->sm_monitored && !nsm->sm_sticky) {
@@ -128,7 +132,6 @@ nsm_unmonitor(struct nlm_host *host)
                else
                        nsm->sm_monitored = 0;
        }
-       return status;
 }
 
 /*
index 30a6a9c1ce4272aaf62bd18a1ddf735a4e7dff2d..38344bfb814aab40eb4f4cd27e8169d2e803a8e2 100644 (file)
@@ -245,6 +245,7 @@ extern void   nlm_host_rebooted(const struct sockaddr_in *, const char *,
  * Host monitoring
  */
 int              nsm_monitor(const struct nlm_host *host);
+void             nsm_unmonitor(const struct nlm_host *host);
 
 /*
  * This is used in garbage collection and resource reclaim
index 546b6102b0d764f0bc93e5ce7cc0c148dfadfd69..896a5e3033231518c176a6165daa41e1edbb2278 100644 (file)
@@ -41,7 +41,6 @@ struct nsm_res {
        u32             state;
 };
 
-int            nsm_unmonitor(struct nlm_host *);
 extern int     nsm_local_state;
 
 #endif /* LINUX_LOCKD_SM_INTER_H */