From: Xue Ying Date: Fri, 10 Aug 2012 02:58:37 +0000 (+0800) Subject: dlm: remove redundant variable assignments X-Git-Tag: upstream/snapshot3+hdmi~6589^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4c798cf695dc7cee9798a686128461ad0070115;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Signed-off-by: David Teigland --- diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 522a69f..3e6aacc 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, if (result < 0) { log_print("Failed to set SO_REUSEADDR on socket: %d", result); } - sock->sk->sk_user_data = con; con->rx_action = tcp_accept_from_sock; con->connect_action = tcp_connect_to_sock; - con->sock = sock; /* Bind to our port */ make_sockaddr(saddr, dlm_config.ci_tcp_port, &addr_len);