Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46300
b: refs/heads/master
c: f2f5095
h: refs/heads/master
v: v3
  • Loading branch information
Patrick Caulfield authored and Steven Whitehouse committed Feb 5, 2007
1 parent 0f75457 commit faa2636
Show file tree
Hide file tree
Showing 2 changed files with 3 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: 1c0f4872dc4bbeb2223a300517099786211fce83
refs/heads/master: f2f5095f9e63db57faa7cb082e958910ecdd7ad4
7 changes: 2 additions & 5 deletions trunk/fs/dlm/lowcomms-tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ struct connection {
struct socket *sock; /* NULL if not connected */
uint32_t nodeid; /* So we know who we are in the list */
struct rw_semaphore sock_sem; /* Stop connect races */
struct list_head read_list; /* On this list when ready for reading */
struct list_head write_list; /* On this list when ready for writing */
struct list_head state_list; /* On this list when ready to connect */
unsigned long flags; /* bit 1,2 = We are on the read/write lists */
#define CF_READ_PENDING 1
#define CF_WRITE_PENDING 2
Expand Down Expand Up @@ -391,7 +388,7 @@ static int accept_from_sock(struct connection *con)
if (result < 0)
return -ENOMEM;

down_read(&con->sock_sem);
down_read_nested(&con->sock_sem, 0);

result = -ENOTCONN;
if (con->sock == NULL)
Expand Down Expand Up @@ -434,7 +431,7 @@ static int accept_from_sock(struct connection *con)
result = -ENOMEM;
goto accept_err;
}
down_write(&newcon->sock_sem);
down_write_nested(&newcon->sock_sem, 1);
if (newcon->sock) {
struct connection *othercon = newcon->othercon;

Expand Down

0 comments on commit faa2636

Please sign in to comment.