diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-09 09:40:24 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-09 09:40:24 -0400 |
commit | 5046791417dcac1ba126b77b8062af15a2f0b8e1 (patch) | |
tree | a59f8eecd3e089046859cd4489c550df7b6b1ead /fs/lockd/host.c | |
parent | 3134cbec5e172c3a86e2c3ef4af34b6cfd380bfa (diff) |
NLM: sem to mutex conversion
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/lockd/host.c')
-rw-r--r-- | fs/lockd/host.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/lockd/host.c b/fs/lockd/host.c index 729ac427d359..5242743c9403 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c | |||
@@ -112,7 +112,7 @@ nlm_lookup_host(int server, struct sockaddr_in *sin, | |||
112 | host->h_version = version; | 112 | host->h_version = version; |
113 | host->h_proto = proto; | 113 | host->h_proto = proto; |
114 | host->h_rpcclnt = NULL; | 114 | host->h_rpcclnt = NULL; |
115 | init_MUTEX(&host->h_sema); | 115 | mutex_init(&host->h_mutex); |
116 | host->h_nextrebind = jiffies + NLM_HOST_REBIND; | 116 | host->h_nextrebind = jiffies + NLM_HOST_REBIND; |
117 | host->h_expires = jiffies + NLM_HOST_EXPIRE; | 117 | host->h_expires = jiffies + NLM_HOST_EXPIRE; |
118 | atomic_set(&host->h_count, 1); | 118 | atomic_set(&host->h_count, 1); |
@@ -172,7 +172,7 @@ nlm_bind_host(struct nlm_host *host) | |||
172 | (unsigned)ntohl(host->h_addr.sin_addr.s_addr)); | 172 | (unsigned)ntohl(host->h_addr.sin_addr.s_addr)); |
173 | 173 | ||
174 | /* Lock host handle */ | 174 | /* Lock host handle */ |
175 | down(&host->h_sema); | 175 | mutex_lock(&host->h_mutex); |
176 | 176 | ||
177 | /* If we've already created an RPC client, check whether | 177 | /* If we've already created an RPC client, check whether |
178 | * RPC rebind is required | 178 | * RPC rebind is required |
@@ -204,12 +204,12 @@ nlm_bind_host(struct nlm_host *host) | |||
204 | host->h_rpcclnt = clnt; | 204 | host->h_rpcclnt = clnt; |
205 | } | 205 | } |
206 | 206 | ||
207 | up(&host->h_sema); | 207 | mutex_unlock(&host->h_mutex); |
208 | return clnt; | 208 | return clnt; |
209 | 209 | ||
210 | forgetit: | 210 | forgetit: |
211 | printk("lockd: couldn't create RPC handle for %s\n", host->h_name); | 211 | printk("lockd: couldn't create RPC handle for %s\n", host->h_name); |
212 | up(&host->h_sema); | 212 | mutex_unlock(&host->h_mutex); |
213 | return NULL; | 213 | return NULL; |
214 | } | 214 | } |
215 | 215 | ||