Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30118
b: refs/heads/master
c: 5046791
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jun 9, 2006
1 parent 18cd09d commit 216f1b0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3134cbec5e172c3a86e2c3ef4af34b6cfd380bfa
refs/heads/master: 5046791417dcac1ba126b77b8062af15a2f0b8e1
8 changes: 4 additions & 4 deletions trunk/fs/lockd/host.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/lockd/lockd.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct nlm_host {
u32 h_nsmstate; /* true remote NSM state */
u32 h_pidcount; /* Pseudopids */
atomic_t h_count; /* reference count */
struct semaphore h_sema; /* mutex for pmap binding */
struct mutex h_mutex; /* mutex for pmap binding */
unsigned long h_nextrebind; /* next portmap call */
unsigned long h_expires; /* eligible for GC */
struct list_head h_lockowners; /* Lockowners for the client */
Expand Down

0 comments on commit 216f1b0

Please sign in to comment.