Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82408
b: refs/heads/master
c: 48df020
h: refs/heads/master
v: v3
  • Loading branch information
Chuck Lever authored and J. Bruce Fields committed Feb 1, 2008
1 parent 0db554d commit 8f2abc5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e5cff482c78a35b9f149a06aa777a1bd693864fb
refs/heads/master: 48df020aa17ac95a012ff765b0086ede5996b320
19 changes: 11 additions & 8 deletions trunk/fs/lockd/host.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,19 @@ static DEFINE_MUTEX(nlm_host_mutex);

static void nlm_gc_hosts(void);
static struct nsm_handle * __nsm_find(const struct sockaddr_in *,
const char *, int, int);
const char *, unsigned int, int);
static struct nsm_handle * nsm_find(const struct sockaddr_in *sin,
const char *hostname,
int hostname_len);
unsigned int hostname_len);

/*
* Common host lookup routine for server & client
*/
static struct nlm_host *
nlm_lookup_host(int server, const struct sockaddr_in *sin,
int proto, int version, const char *hostname,
int hostname_len, const struct sockaddr_in *ssin)
unsigned int hostname_len,
const struct sockaddr_in *ssin)
{
struct hlist_head *chain;
struct hlist_node *pos;
Expand Down Expand Up @@ -176,7 +177,7 @@ nlm_destroy_host(struct nlm_host *host)
*/
struct nlm_host *
nlmclnt_lookup_host(const struct sockaddr_in *sin, int proto, int version,
const char *hostname, int hostname_len)
const char *hostname, unsigned int hostname_len)
{
struct sockaddr_in ssin = {0};

Expand All @@ -189,7 +190,7 @@ nlmclnt_lookup_host(const struct sockaddr_in *sin, int proto, int version,
*/
struct nlm_host *
nlmsvc_lookup_host(struct svc_rqst *rqstp,
const char *hostname, int hostname_len)
const char *hostname, unsigned int hostname_len)
{
struct sockaddr_in ssin = {0};

Expand Down Expand Up @@ -307,7 +308,8 @@ void nlm_release_host(struct nlm_host *host)
* Release all resources held by that peer.
*/
void nlm_host_rebooted(const struct sockaddr_in *sin,
const char *hostname, int hostname_len,
const char *hostname,
unsigned int hostname_len,
u32 new_state)
{
struct hlist_head *chain;
Expand Down Expand Up @@ -449,7 +451,7 @@ static DEFINE_MUTEX(nsm_mutex);

static struct nsm_handle *
__nsm_find(const struct sockaddr_in *sin,
const char *hostname, int hostname_len,
const char *hostname, unsigned int hostname_len,
int create)
{
struct nsm_handle *nsm = NULL;
Expand Down Expand Up @@ -503,7 +505,8 @@ __nsm_find(const struct sockaddr_in *sin,
}

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,
unsigned int hostname_len)
{
return __nsm_find(sin, hostname, hostname_len, 1);
}
Expand Down
9 changes: 6 additions & 3 deletions trunk/include/linux/lockd/lockd.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,17 @@ void nlmclnt_next_cookie(struct nlm_cookie *);
/*
* Host cache
*/
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 *nlmclnt_lookup_host(const struct sockaddr_in *, int, int,
const char *, unsigned int);
struct nlm_host *nlmsvc_lookup_host(struct svc_rqst *, const char *,
unsigned int);
struct rpc_clnt * nlm_bind_host(struct nlm_host *);
void nlm_rebind_host(struct nlm_host *);
struct nlm_host * nlm_get_host(struct nlm_host *);
void nlm_release_host(struct nlm_host *);
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 *,
unsigned int, u32);
void nsm_release(struct nsm_handle *);


Expand Down
4 changes: 2 additions & 2 deletions trunk/include/linux/lockd/xdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct svc_rqst;
/* Lock info passed via NLM */
struct nlm_lock {
char * caller;
int len; /* length of "caller" */
unsigned int len; /* length of "caller" */
struct nfs_fh fh;
struct xdr_netobj oh;
u32 svid;
Expand Down Expand Up @@ -78,7 +78,7 @@ struct nlm_res {
*/
struct nlm_reboot {
char * mon;
int len;
unsigned int len;
u32 state;
__be32 addr;
__be32 vers;
Expand Down

0 comments on commit 8f2abc5

Please sign in to comment.