NLM: sem to mutex conversion
[linux-2.6.git] / fs / lockd / host.c
index 729ac427d359537f20e1dffa15514869ca8264ce..5242743c9403e6cce10490dac01ceb9dae684926 100644 (file)
@@ -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;
 }