mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 08:02:56 +00:00
[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>
This commit is contained in:
parent
7ddae86095
commit
c585646dd1
2 changed files with 28 additions and 27 deletions
|
@ -36,34 +36,14 @@ static DEFINE_MUTEX(nlm_host_mutex);
|
||||||
static void nlm_gc_hosts(void);
|
static void nlm_gc_hosts(void);
|
||||||
static struct nsm_handle * __nsm_find(const struct sockaddr_in *,
|
static struct nsm_handle * __nsm_find(const struct sockaddr_in *,
|
||||||
const char *, int, int);
|
const char *, int, int);
|
||||||
|
static struct nsm_handle * nsm_find(const struct sockaddr_in *sin,
|
||||||
/*
|
const char *hostname,
|
||||||
* Find an NLM server handle in the cache. If there is none, create it.
|
int hostname_len);
|
||||||
*/
|
|
||||||
struct nlm_host *
|
|
||||||
nlmclnt_lookup_host(const struct sockaddr_in *sin, int proto, int version,
|
|
||||||
const char *hostname, int hostname_len)
|
|
||||||
{
|
|
||||||
return nlm_lookup_host(0, sin, proto, version,
|
|
||||||
hostname, hostname_len);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Find an NLM client handle in the cache. If there is none, create it.
|
|
||||||
*/
|
|
||||||
struct nlm_host *
|
|
||||||
nlmsvc_lookup_host(struct svc_rqst *rqstp,
|
|
||||||
const char *hostname, int hostname_len)
|
|
||||||
{
|
|
||||||
return nlm_lookup_host(1, &rqstp->rq_addr,
|
|
||||||
rqstp->rq_prot, rqstp->rq_vers,
|
|
||||||
hostname, hostname_len);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Common host lookup routine for server & client
|
* Common host lookup routine for server & client
|
||||||
*/
|
*/
|
||||||
struct nlm_host *
|
static struct nlm_host *
|
||||||
nlm_lookup_host(int server, const struct sockaddr_in *sin,
|
nlm_lookup_host(int server, const struct sockaddr_in *sin,
|
||||||
int proto, int version,
|
int proto, int version,
|
||||||
const char *hostname,
|
const char *hostname,
|
||||||
|
@ -194,6 +174,29 @@ nlm_destroy_host(struct nlm_host *host)
|
||||||
kfree(host);
|
kfree(host);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Find an NLM server handle in the cache. If there is none, create it.
|
||||||
|
*/
|
||||||
|
struct nlm_host *
|
||||||
|
nlmclnt_lookup_host(const struct sockaddr_in *sin, int proto, int version,
|
||||||
|
const char *hostname, int hostname_len)
|
||||||
|
{
|
||||||
|
return nlm_lookup_host(0, sin, proto, version,
|
||||||
|
hostname, hostname_len);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Find an NLM client handle in the cache. If there is none, create it.
|
||||||
|
*/
|
||||||
|
struct nlm_host *
|
||||||
|
nlmsvc_lookup_host(struct svc_rqst *rqstp,
|
||||||
|
const char *hostname, int hostname_len)
|
||||||
|
{
|
||||||
|
return nlm_lookup_host(1, &rqstp->rq_addr,
|
||||||
|
rqstp->rq_prot, rqstp->rq_vers,
|
||||||
|
hostname, hostname_len);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create the NLM RPC client for an NLM peer
|
* Create the NLM RPC client for an NLM peer
|
||||||
*/
|
*/
|
||||||
|
@ -495,7 +498,7 @@ out:
|
||||||
return nsm;
|
return nsm;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct nsm_handle *
|
static struct nsm_handle *
|
||||||
nsm_find(const struct sockaddr_in *sin, const char *hostname, int hostname_len)
|
nsm_find(const struct sockaddr_in *sin, const char *hostname, int hostname_len)
|
||||||
{
|
{
|
||||||
return __nsm_find(sin, hostname, hostname_len, 1);
|
return __nsm_find(sin, hostname, hostname_len, 1);
|
||||||
|
|
|
@ -164,14 +164,12 @@ void nlmclnt_next_cookie(struct nlm_cookie *);
|
||||||
*/
|
*/
|
||||||
struct nlm_host * nlmclnt_lookup_host(const struct sockaddr_in *, int, int, const char *, int);
|
struct nlm_host * nlmclnt_lookup_host(const struct sockaddr_in *, int, int, const char *, int);
|
||||||
struct nlm_host * nlmsvc_lookup_host(struct svc_rqst *, const char *, int);
|
struct nlm_host * nlmsvc_lookup_host(struct svc_rqst *, const char *, int);
|
||||||
struct nlm_host * nlm_lookup_host(int server, const struct sockaddr_in *, int, int, const char *, int);
|
|
||||||
struct rpc_clnt * nlm_bind_host(struct nlm_host *);
|
struct rpc_clnt * nlm_bind_host(struct nlm_host *);
|
||||||
void nlm_rebind_host(struct nlm_host *);
|
void nlm_rebind_host(struct nlm_host *);
|
||||||
struct nlm_host * nlm_get_host(struct nlm_host *);
|
struct nlm_host * nlm_get_host(struct nlm_host *);
|
||||||
void nlm_release_host(struct nlm_host *);
|
void nlm_release_host(struct nlm_host *);
|
||||||
void nlm_shutdown_hosts(void);
|
void nlm_shutdown_hosts(void);
|
||||||
extern void nlm_host_rebooted(const struct sockaddr_in *, const char *, int, u32);
|
extern void nlm_host_rebooted(const struct sockaddr_in *, const char *, int, u32);
|
||||||
struct nsm_handle *nsm_find(const struct sockaddr_in *, const char *, int);
|
|
||||||
void nsm_release(struct nsm_handle *);
|
void nsm_release(struct nsm_handle *);
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue