diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-12-06 23:38:29 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-07 11:39:40 -0500 |
commit | c585646dd1d98caf0a5f2e85c794c1441df6fac1 (patch) | |
tree | 244fe4b88eeaeccc449d1c936a9e0a4be27b6e0d | |
parent | 7ddae86095794cce4364740edd8463c77654a265 (diff) |
[PATCH] fs/lockd/host.c: make 2 functions static
Make the following needlessly global functions static:
- nlm_lookup_host()
- nsm_find()
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | fs/lockd/host.c | 53 | ||||
-rw-r--r-- | include/linux/lockd/lockd.h | 2 |
2 files changed, 28 insertions, 27 deletions
diff --git a/fs/lockd/host.c b/fs/lockd/host.c index fb24a9730345..3d4610c2a266 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c | |||
@@ -36,34 +36,14 @@ static DEFINE_MUTEX(nlm_host_mutex); | |||
36 | static void nlm_gc_hosts(void); | 36 | static void nlm_gc_hosts(void); |
37 | static struct nsm_handle * __nsm_find(const struct sockaddr_in *, | 37 | static struct nsm_handle * __nsm_find(const struct sockaddr_in *, |
38 | const char *, int, int); | 38 | const char *, int, int); |
39 | 39 | static struct nsm_handle * nsm_find(const struct sockaddr_in *sin, | |
40 | /* | 40 | const char *hostname, |
41 | * Find an NLM server handle in the cache. If there is none, create it. | 41 | int hostname_len); |
42 | */ | ||
43 | struct nlm_host * | ||
44 | nlmclnt_lookup_host(const struct sockaddr_in *sin, int proto, int version, | ||
45 | const char *hostname, int hostname_len) | ||
46 | { | ||
47 | return nlm_lookup_host(0, sin, proto, version, | ||
48 | hostname, hostname_len); | ||
49 | } | ||
50 | |||
51 | /* | ||
52 | * Find an NLM client handle in the cache. If there is none, create it. | ||
53 | */ | ||
54 | struct nlm_host * | ||
55 | nlmsvc_lookup_host(struct svc_rqst *rqstp, | ||
56 | const char *hostname, int hostname_len) | ||
57 | { | ||
58 | return nlm_lookup_host(1, &rqstp->rq_addr, | ||
59 | rqstp->rq_prot, rqstp->rq_vers, | ||
60 | hostname, hostname_len); | ||
61 | } | ||
62 | 42 | ||
63 | /* | 43 | /* |
64 | * Common host lookup routine for server & client | 44 | * Common host lookup routine for server & client |
65 | */ | 45 | */ |
66 | struct nlm_host * | 46 | static struct nlm_host * |
67 | nlm_lookup_host(int server, const struct sockaddr_in *sin, | 47 | nlm_lookup_host(int server, const struct sockaddr_in *sin, |
68 | int proto, int version, | 48 | int proto, int version, |
69 | const char *hostname, | 49 | const char *hostname, |
@@ -195,6 +175,29 @@ nlm_destroy_host(struct nlm_host *host) | |||
195 | } | 175 | } |
196 | 176 | ||
197 | /* | 177 | /* |
178 | * Find an NLM server handle in the cache. If there is none, create it. | ||
179 | */ | ||
180 | struct nlm_host * | ||
181 | nlmclnt_lookup_host(const struct sockaddr_in *sin, int proto, int version, | ||
182 | const char *hostname, int hostname_len) | ||
183 | { | ||
184 | return nlm_lookup_host(0, sin, proto, version, | ||
185 | hostname, hostname_len); | ||
186 | } | ||
187 | |||
188 | /* | ||
189 | * Find an NLM client handle in the cache. If there is none, create it. | ||
190 | */ | ||
191 | struct nlm_host * | ||
192 | nlmsvc_lookup_host(struct svc_rqst *rqstp, | ||
193 | const char *hostname, int hostname_len) | ||
194 | { | ||
195 | return nlm_lookup_host(1, &rqstp->rq_addr, | ||
196 | rqstp->rq_prot, rqstp->rq_vers, | ||
197 | hostname, hostname_len); | ||
198 | } | ||
199 | |||
200 | /* | ||
198 | * Create the NLM RPC client for an NLM peer | 201 | * Create the NLM RPC client for an NLM peer |
199 | */ | 202 | */ |
200 | struct rpc_clnt * | 203 | struct rpc_clnt * |
@@ -495,7 +498,7 @@ out: | |||
495 | return nsm; | 498 | return nsm; |
496 | } | 499 | } |
497 | 500 | ||
498 | struct nsm_handle * | 501 | static struct nsm_handle * |
499 | nsm_find(const struct sockaddr_in *sin, const char *hostname, int hostname_len) | 502 | nsm_find(const struct sockaddr_in *sin, const char *hostname, int hostname_len) |
500 | { | 503 | { |
501 | return __nsm_find(sin, hostname, hostname_len, 1); | 504 | return __nsm_find(sin, hostname, hostname_len, 1); |
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h index 862d9730a60d..8c39654549d8 100644 --- a/include/linux/lockd/lockd.h +++ b/include/linux/lockd/lockd.h | |||
@@ -164,14 +164,12 @@ void nlmclnt_next_cookie(struct nlm_cookie *); | |||
164 | */ | 164 | */ |
165 | struct nlm_host * nlmclnt_lookup_host(const struct sockaddr_in *, int, int, const char *, int); | 165 | struct nlm_host * nlmclnt_lookup_host(const struct sockaddr_in *, int, int, const char *, int); |
166 | struct nlm_host * nlmsvc_lookup_host(struct svc_rqst *, const char *, int); | 166 | struct nlm_host * nlmsvc_lookup_host(struct svc_rqst *, const char *, int); |
167 | struct nlm_host * nlm_lookup_host(int server, const struct sockaddr_in *, int, int, const char *, int); | ||
168 | struct rpc_clnt * nlm_bind_host(struct nlm_host *); | 167 | struct rpc_clnt * nlm_bind_host(struct nlm_host *); |
169 | void nlm_rebind_host(struct nlm_host *); | 168 | void nlm_rebind_host(struct nlm_host *); |
170 | struct nlm_host * nlm_get_host(struct nlm_host *); | 169 | struct nlm_host * nlm_get_host(struct nlm_host *); |
171 | void nlm_release_host(struct nlm_host *); | 170 | void nlm_release_host(struct nlm_host *); |
172 | void nlm_shutdown_hosts(void); | 171 | void nlm_shutdown_hosts(void); |
173 | extern void nlm_host_rebooted(const struct sockaddr_in *, const char *, int, u32); | 172 | extern void nlm_host_rebooted(const struct sockaddr_in *, const char *, int, u32); |
174 | struct nsm_handle *nsm_find(const struct sockaddr_in *, const char *, int); | ||
175 | void nsm_release(struct nsm_handle *); | 173 | void nsm_release(struct nsm_handle *); |
176 | 174 | ||
177 | 175 | ||