diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2008-03-14 14:18:37 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-03-19 18:00:47 -0400 |
commit | eb18860e1385bfc7f08fcb7ba362e4a5156c8324 (patch) | |
tree | c8dff7c59d8b2d356eda454aa57c6f0e278cad6b /fs/lockd/host.c | |
parent | 90d5b18061656993410dfd57ddb88aa5a3f34563 (diff) |
NLM: NLM protocol version numbers are u32
Clean up: RPC protocol version numbers are u32. Make sure we use an
appropriate type for NLM version numbers when calling nlm_lookup_host().
Eliminates a harmless mixed sign comparison in nlm_host_lookup().
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/lockd/host.c')
-rw-r--r-- | fs/lockd/host.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/fs/lockd/host.c b/fs/lockd/host.c index f1ef49fff118..f23750db1650 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c | |||
@@ -42,11 +42,12 @@ static struct nsm_handle * nsm_find(const struct sockaddr_in *sin, | |||
42 | /* | 42 | /* |
43 | * Common host lookup routine for server & client | 43 | * Common host lookup routine for server & client |
44 | */ | 44 | */ |
45 | static struct nlm_host * | 45 | static struct nlm_host *nlm_lookup_host(int server, |
46 | nlm_lookup_host(int server, const struct sockaddr_in *sin, | 46 | const struct sockaddr_in *sin, |
47 | int proto, int version, const char *hostname, | 47 | int proto, u32 version, |
48 | unsigned int hostname_len, | 48 | const char *hostname, |
49 | const struct sockaddr_in *ssin) | 49 | unsigned int hostname_len, |
50 | const struct sockaddr_in *ssin) | ||
50 | { | 51 | { |
51 | struct hlist_head *chain; | 52 | struct hlist_head *chain; |
52 | struct hlist_node *pos; | 53 | struct hlist_node *pos; |
@@ -55,7 +56,7 @@ nlm_lookup_host(int server, const struct sockaddr_in *sin, | |||
55 | int hash; | 56 | int hash; |
56 | 57 | ||
57 | dprintk("lockd: nlm_lookup_host("NIPQUAD_FMT"->"NIPQUAD_FMT | 58 | dprintk("lockd: nlm_lookup_host("NIPQUAD_FMT"->"NIPQUAD_FMT |
58 | ", p=%d, v=%d, my role=%s, name=%.*s)\n", | 59 | ", p=%d, v=%u, my role=%s, name=%.*s)\n", |
59 | NIPQUAD(ssin->sin_addr.s_addr), | 60 | NIPQUAD(ssin->sin_addr.s_addr), |
60 | NIPQUAD(sin->sin_addr.s_addr), proto, version, | 61 | NIPQUAD(sin->sin_addr.s_addr), proto, version, |
61 | server? "server" : "client", | 62 | server? "server" : "client", |
@@ -175,9 +176,10 @@ nlm_destroy_host(struct nlm_host *host) | |||
175 | /* | 176 | /* |
176 | * Find an NLM server handle in the cache. If there is none, create it. | 177 | * Find an NLM server handle in the cache. If there is none, create it. |
177 | */ | 178 | */ |
178 | struct nlm_host * | 179 | struct nlm_host *nlmclnt_lookup_host(const struct sockaddr_in *sin, |
179 | nlmclnt_lookup_host(const struct sockaddr_in *sin, int proto, int version, | 180 | int proto, u32 version, |
180 | const char *hostname, unsigned int hostname_len) | 181 | const char *hostname, |
182 | unsigned int hostname_len) | ||
181 | { | 183 | { |
182 | struct sockaddr_in ssin = {0}; | 184 | struct sockaddr_in ssin = {0}; |
183 | 185 | ||