Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c553e173 authored by tsutomu.owa@toshiba.co.jp's avatar tsutomu.owa@toshiba.co.jp Committed by David Teigland
Browse files

DLM: close othercon at send/receive error



If an error occurs in the sending / receiving process, if othercon
exists, sending / receiving processing using othercon may also result
in an error. We fix to pre-close othercon as well.

Signed-off-by: default avatarTadashi Miyauchi <miyauchi@toshiba-tops.co.jp>
Signed-off-by: default avatarTsutomu Owa <tsutomu.owa@toshiba.co.jp>
Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
parent 59661212
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -703,7 +703,7 @@ static int receive_from_sock(struct connection *con)
out_close:
	mutex_unlock(&con->sock_mutex);
	if (ret != -EAGAIN) {
		close_connection(con, false, true, false);
		close_connection(con, true, true, false);
		/* Reconnect when there is something to send */
	}
	/* Don't return success if we really got EOF */
@@ -1530,7 +1530,7 @@ static void send_to_sock(struct connection *con)

send_error:
	mutex_unlock(&con->sock_mutex);
	close_connection(con, false, false, true);
	close_connection(con, true, false, true);
	/* Requeue the send work. When the work daemon runs again, it will try
	   a new connection, then call this function again. */
	queue_work(send_workqueue, &con->swork);