aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Caulfield <pcaulfie@redhat.com>2007-01-22 09:50:10 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2007-02-05 13:37:23 -0500
commitf2f5095f9e63db57faa7cb082e958910ecdd7ad4 (patch)
tree42344ef03a046bd6c9cf8ca5b14a693094a70e3f
parent1c0f4872dc4bbeb2223a300517099786211fce83 (diff)
[DLM] lowcomms tidy
This patch removes some redundant fields from the connection structure and adds some lockdep annotation to remove spurious warnings. Signed-Off-By: Patrick Caulfield <pcaulfie@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
-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