aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/host.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-04-24 14:46:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-24 14:46:16 -0400
commit563307b2fa15d687abc54bd980b9847ebf0e3231 (patch)
tree7f16be30217a2e66360ede97aa27d07a4ebd7e55 /fs/lockd/host.c
parent10c993a6b5418cb1026775765ba4c70ffb70853d (diff)
parent233607dbbc823caf685e778cabc49fb7f679900b (diff)
Merge git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (80 commits) SUNRPC: Invalidate the RPCSEC_GSS session if the server dropped the request make nfs_automount_list static NFS: remove duplicate flags assignment from nfs_validate_mount_data NFS - fix potential NULL pointer dereference v2 SUNRPC: Don't change the RPCSEC_GSS context on a credential that is in use SUNRPC: Fix a race in gss_refresh_upcall() SUNRPC: Don't disconnect more than once if retransmitting NFSv4 requests SUNRPC: Remove the unused export of xprt_force_disconnect SUNRPC: remove XS_SENDMSG_RETRY SUNRPC: Protect creds against early garbage collection NFSv4: Attempt to use machine credentials in SETCLIENTID calls NFSv4: Reintroduce machine creds NFSv4: Don't use cred->cr_ops->cr_name in nfs4_proc_setclientid() nfs: fix printout of multiword bitfields nfs: return negative error value from nfs{,4}_stat_to_errno NLM/lockd: Ensure client locking calls use correct credentials NFS: Remove the buggy lock-if-signalled case from do_setlk() NLM/lockd: Fix a race when cancelling a blocking lock NLM/lockd: Ensure that nlmclnt_cancel() returns results of the CANCEL call NLM: Remove the signal masking in nlmclnt_proc/nlmclnt_cancel ...
Diffstat (limited to 'fs/lockd/host.c')
-rw-r--r--fs/lockd/host.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/fs/lockd/host.c b/fs/lockd/host.c
index c7854791898f..a17664c7eacc 100644
--- a/fs/lockd/host.c
+++ b/fs/lockd/host.c
@@ -41,11 +41,12 @@ static struct nsm_handle * nsm_find(const struct sockaddr_in *sin,
41/* 41/*
42 * Common host lookup routine for server & client 42 * Common host lookup routine for server & client
43 */ 43 */
44static struct nlm_host * 44static struct nlm_host *nlm_lookup_host(int server,
45nlm_lookup_host(int server, const struct sockaddr_in *sin, 45 const struct sockaddr_in *sin,
46 int proto, int version, const char *hostname, 46 int proto, u32 version,
47 unsigned int hostname_len, 47 const char *hostname,
48 const struct sockaddr_in *ssin) 48 unsigned int hostname_len,
49 const struct sockaddr_in *ssin)
49{ 50{
50 struct hlist_head *chain; 51 struct hlist_head *chain;
51 struct hlist_node *pos; 52 struct hlist_node *pos;
@@ -54,7 +55,7 @@ nlm_lookup_host(int server, const struct sockaddr_in *sin,
54 int hash; 55 int hash;
55 56
56 dprintk("lockd: nlm_lookup_host("NIPQUAD_FMT"->"NIPQUAD_FMT 57 dprintk("lockd: nlm_lookup_host("NIPQUAD_FMT"->"NIPQUAD_FMT
57 ", p=%d, v=%d, my role=%s, name=%.*s)\n", 58 ", p=%d, v=%u, my role=%s, name=%.*s)\n",
58 NIPQUAD(ssin->sin_addr.s_addr), 59 NIPQUAD(ssin->sin_addr.s_addr),
59 NIPQUAD(sin->sin_addr.s_addr), proto, version, 60 NIPQUAD(sin->sin_addr.s_addr), proto, version,
60 server? "server" : "client", 61 server? "server" : "client",
@@ -172,9 +173,10 @@ nlm_destroy_host(struct nlm_host *host)
172/* 173/*
173 * Find an NLM server handle in the cache. If there is none, create it. 174 * Find an NLM server handle in the cache. If there is none, create it.
174 */ 175 */
175struct nlm_host * 176struct nlm_host *nlmclnt_lookup_host(const struct sockaddr_in *sin,
176nlmclnt_lookup_host(const struct sockaddr_in *sin, int proto, int version, 177 int proto, u32 version,
177 const char *hostname, unsigned int hostname_len) 178 const char *hostname,
179 unsigned int hostname_len)
178{ 180{
179 struct sockaddr_in ssin = {0}; 181 struct sockaddr_in ssin = {0};
180 182