Skip to content

Commit 0ea47e4

Browse files
Alexander Aringteigland
authored andcommitted
fs: dlm: don't close socket on invalid message
This patch doesn't close sockets when there is an invalid dlm message received. The connection will probably reconnect anyway so. To not close the connection will reduce the number of possible failtures. As we don't have a different strategy to react on such scenario just keep going the connection and ignore the message. Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
1 parent 9c9f168 commit 0ea47e4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

fs/dlm/lowcomms.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -685,14 +685,14 @@ static int receive_from_sock(struct connection *con)
685685
page_address(con->rx_page),
686686
con->cb.base, con->cb.len,
687687
PAGE_SIZE);
688-
if (ret == -EBADMSG) {
689-
log_print("lowcomms: addr=%p, base=%u, len=%u, read=%d",
690-
page_address(con->rx_page), con->cb.base,
688+
if (ret < 0) {
689+
log_print("lowcomms err %d: addr=%p, base=%u, len=%u, read=%d",
690+
ret, page_address(con->rx_page), con->cb.base,
691691
con->cb.len, r);
692+
cbuf_eat(&con->cb, r);
693+
} else {
694+
cbuf_eat(&con->cb, ret);
692695
}
693-
if (ret < 0)
694-
goto out_close;
695-
cbuf_eat(&con->cb, ret);
696696

697697
if (cbuf_empty(&con->cb) && !call_again_soon) {
698698
__free_page(con->rx_page);

0 commit comments

Comments
 (0)