From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Aring Date: Thu, 23 Jul 2020 10:49:06 -0400 Subject: [Cluster-devel] [PATCH dlm-next 2/4] fs: dlm: fix report error of invalid messages In-Reply-To: <20200723144908.271110-1-aahringo@redhat.com> References: <20200723144908.271110-1-aahringo@redhat.com> Message-ID: <20200723144908.271110-3-aahringo@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit This patch fix the error reporting of invalid messages, the return value of -EBADMSG is never returned by dlm_process_incoming_buffer(), so we just check for negative return values. Signed-off-by: Alexander Aring --- fs/dlm/lowcomms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index ec7ed228a9843..19b50d69babef 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -685,9 +685,9 @@ static int receive_from_sock(struct connection *con) page_address(con->rx_page), con->cb.base, con->cb.len, PAGE_SIZE); - if (ret == -EBADMSG) { - log_print("lowcomms: addr=%p, base=%u, len=%u, read=%d", - page_address(con->rx_page), con->cb.base, + if (ret < 0) { + log_print("lowcomms err %d: addr=%p, base=%u, len=%u, read=%d", + ret, page_address(con->rx_page), con->cb.base, con->cb.len, r); } cbuf_eat(&con->cb, ret); -- 2.26.2