aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm
diff options
context:
space:
mode:
authorXue Ying <ying.xue@windriver.com>2012-08-09 22:58:37 -0400
committerDavid Teigland <teigland@redhat.com>2012-08-10 10:10:10 -0400
commitb4c798cf695dc7cee9798a686128461ad0070115 (patch)
tree920c1d11f1e2a5f141190cc01a828560ffc80d73 /fs/dlm
parent475f230c6072fb2186f48b23943afcd0ee3a8343 (diff)
dlm: remove redundant variable assignments
Once the tcp_create_listen_sock() is returned successfully, we will invoke add_sock() immediately. In add_sock(), the 'con' variable is assigned to 'sk_user_data', meanwhile, the 'sock' is also set to 'con->sock'. So it's unnecessary to do the same thing in tcp_create_listen_sock(). Signed-off-by: Xue Ying <ying.xue@windriver.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/lowcomms.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 522a69fccd84..3e6aaccce951 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -1175,10 +1175,8 @@ static struct socket *tcp_create_listen_sock(struct connection *con,
1175 if (result < 0) { 1175 if (result < 0) {
1176 log_print("Failed to set SO_REUSEADDR on socket: %d", result); 1176 log_print("Failed to set SO_REUSEADDR on socket: %d", result);
1177 } 1177 }
1178 sock->sk->sk_user_data = con;
1179 con->rx_action = tcp_accept_from_sock; 1178 con->rx_action = tcp_accept_from_sock;
1180 con->connect_action = tcp_connect_to_sock; 1179 con->connect_action = tcp_connect_to_sock;
1181 con->sock = sock;
1182 1180
1183 /* Bind to our port */ 1181 /* Bind to our port */
1184 make_sockaddr(saddr, dlm_config.ci_tcp_port, &addr_len); 1182 make_sockaddr(saddr, dlm_config.ci_tcp_port, &addr_len);