dlm: don't save callbacks after accept
authorBob Peterson <rpeterso@redhat.com>
Fri, 23 Sep 2016 18:23:26 +0000 (14:23 -0400)
committerDavid Teigland <teigland@redhat.com>
Wed, 19 Oct 2016 16:00:03 +0000 (11:00 -0500)
commit3735b4b9f1c102dcaf70241225339bdea4447dc8
tree0491950ff3867a194f0c7eba9de96e3c98af9e27
parent7963b8a59845eabafa0e8ff330a2e0884f0279a9
dlm: don't save callbacks after accept

When DLM calls accept() on a socket, the comm code copies the sk
after we've saved its callbacks. Afterward, it calls add_sock which
saves the callbacks a second time. Since the error reporting function
lowcomms_error_report calls the previous callback too, this results
in a recursive call to itself. This patch adds a new parameter to
function add_sock to tell whether to save the callbacks. Function
tcp_accept_from_sock (and its sctp counterpart) then calls it with
false to avoid the recursion.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/lowcomms.c