aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/lockd/host.c8
-rw-r--r--include/linux/lockd/lockd.h2
2 files changed, 5 insertions, 5 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
210forgetit: 210forgetit:
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
diff --git a/include/linux/lockd/lockd.h b/include/linux/lockd/lockd.h
index 112936fcda80..a6c1a33e5ae3 100644
--- a/include/linux/lockd/lockd.h
+++ b/include/linux/lockd/lockd.h
@@ -54,7 +54,7 @@ struct nlm_host {
54 u32 h_nsmstate; /* true remote NSM state */ 54 u32 h_nsmstate; /* true remote NSM state */
55 u32 h_pidcount; /* Pseudopids */ 55 u32 h_pidcount; /* Pseudopids */
56 atomic_t h_count; /* reference count */ 56 atomic_t h_count; /* reference count */
57 struct semaphore h_sema; /* mutex for pmap binding */ 57 struct mutex h_mutex; /* mutex for pmap binding */
58 unsigned long h_nextrebind; /* next portmap call */ 58 unsigned long h_nextrebind; /* next portmap call */
59 unsigned long h_expires; /* eligible for GC */ 59 unsigned long h_expires; /* eligible for GC */
60 struct list_head h_lockowners; /* Lockowners for the client */ 60 struct list_head h_lockowners; /* Lockowners for the client */