summaryrefslogtreecommitdiffstats
path: root/fs/dlm
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2016-10-22 14:37:36 +0000
committerDavid Teigland <teigland@redhat.com>2016-10-24 10:01:51 -0500
commit26c1ec2fe410ba861f15ebbfc9f44f907a41b6ff (patch)
tree53b1a67d2b9e4860bcc2a98e6f96fea76157c48d /fs/dlm
parentaa9f1012858bc7f44368f1e4453c989d873b0860 (diff)
downloadlinux-26c1ec2fe410ba861f15ebbfc9f44f907a41b6ff.tar.bz2
dlm: fix error return code in sctp_accept_from_sock()
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/lowcomms.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index df680a26141b..7d398d300e97 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -879,7 +879,8 @@ static int sctp_accept_from_sock(struct connection *con)
}
make_sockaddr(&prim.ssp_addr, 0, &addr_len);
- if (addr_to_nodeid(&prim.ssp_addr, &nodeid)) {
+ ret = addr_to_nodeid(&prim.ssp_addr, &nodeid);
+ if (ret) {
unsigned char *b = (unsigned char *)&prim.ssp_addr;
log_print("reject connect from unknown addr");