summaryrefslogtreecommitdiffstats
path: root/fs/lockd
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-06-09 09:40:24 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-06-09 09:40:24 -0400
commit5046791417dcac1ba126b77b8062af15a2f0b8e1 (patch)
treea59f8eecd3e089046859cd4489c550df7b6b1ead /fs/lockd
parent3134cbec5e172c3a86e2c3ef4af34b6cfd380bfa (diff)
downloadlinux-5046791417dcac1ba126b77b8062af15a2f0b8e1.tar.gz
linux-5046791417dcac1ba126b77b8062af15a2f0b8e1.tar.bz2
linux-5046791417dcac1ba126b77b8062af15a2f0b8e1.zip
NLM: sem to mutex conversion
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/lockd')
-rw-r--r--fs/lockd/host.c8
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,
host->h_version = version;
host->h_proto = proto;
host->h_rpcclnt = NULL;
- init_MUTEX(&host->h_sema);
+ mutex_init(&host->h_mutex);
host->h_nextrebind = jiffies + NLM_HOST_REBIND;
host->h_expires = jiffies + NLM_HOST_EXPIRE;
atomic_set(&host->h_count, 1);
@@ -172,7 +172,7 @@ nlm_bind_host(struct nlm_host *host)
(unsigned)ntohl(host->h_addr.sin_addr.s_addr));
/* Lock host handle */
- down(&host->h_sema);
+ mutex_lock(&host->h_mutex);
/* If we've already created an RPC client, check whether
* RPC rebind is required
@@ -204,12 +204,12 @@ nlm_bind_host(struct nlm_host *host)
host->h_rpcclnt = clnt;
}
- up(&host->h_sema);
+ mutex_unlock(&host->h_mutex);
return clnt;
forgetit:
printk("lockd: couldn't create RPC handle for %s\n", host->h_name);
- up(&host->h_sema);
+ mutex_unlock(&host->h_mutex);
return NULL;
}