aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/lowcomms-tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/dlm/lowcomms-tcp.c')
-rw-r--r--fs/dlm/lowcomms-tcp.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/dlm/lowcomms-tcp.c b/fs/dlm/lowcomms-tcp.c
index 86e5f81da7cb..6e27201f2f95 100644
--- a/fs/dlm/lowcomms-tcp.c
+++ b/fs/dlm/lowcomms-tcp.c
@@ -97,9 +97,6 @@ struct connection {
97 struct socket *sock; /* NULL if not connected */ 97 struct socket *sock; /* NULL if not connected */
98 uint32_t nodeid; /* So we know who we are in the list */ 98 uint32_t nodeid; /* So we know who we are in the list */
99 struct rw_semaphore sock_sem; /* Stop connect races */ 99 struct rw_semaphore sock_sem; /* Stop connect races */
100 struct list_head read_list; /* On this list when ready for reading */
101 struct list_head write_list; /* On this list when ready for writing */
102 struct list_head state_list; /* On this list when ready to connect */
103 unsigned long flags; /* bit 1,2 = We are on the read/write lists */ 100 unsigned long flags; /* bit 1,2 = We are on the read/write lists */
104#define CF_READ_PENDING 1 101#define CF_READ_PENDING 1
105#define CF_WRITE_PENDING 2 102#define CF_WRITE_PENDING 2
@@ -391,7 +388,7 @@ static int accept_from_sock(struct connection *con)
391 if (result < 0) 388 if (result < 0)
392 return -ENOMEM; 389 return -ENOMEM;
393 390
394 down_read(&con->sock_sem); 391 down_read_nested(&con->sock_sem, 0);
395 392
396 result = -ENOTCONN; 393 result = -ENOTCONN;
397 if (con->sock == NULL) 394 if (con->sock == NULL)
@@ -434,7 +431,7 @@ static int accept_from_sock(struct connection *con)
434 result = -ENOMEM; 431 result = -ENOMEM;
435 goto accept_err; 432 goto accept_err;
436 } 433 }
437 down_write(&newcon->sock_sem); 434 down_write_nested(&newcon->sock_sem, 1);
438 if (newcon->sock) { 435 if (newcon->sock) {
439 struct connection *othercon = newcon->othercon; 436 struct connection *othercon = newcon->othercon;
440 437