diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2008-12-04 14:21:38 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-01-06 11:53:52 -0500 |
commit | 356c3eb466fd1a12afd6448d90fba3922836e5f1 (patch) | |
tree | 1b30ed40ea9ee8c0e548f71d7e36bafd293ad764 /fs/lockd | |
parent | c8c23c423dec49cb439697d3dc714e1500ff1610 (diff) |
NLM: Move the public declaration of nsm_unmonitor() to lockd.h
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>
Diffstat (limited to 'fs/lockd')
-rw-r--r-- | fs/lockd/mon.c | 15 |
1 files changed, 9 insertions, 6 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 | */ |
113 | int | 118 | void nsm_unmonitor(const struct nlm_host *host) |
114 | nsm_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 | /* |