fs: dlm: fix missing unlock on error in accept_from_sock()

Add the missing unlock before return from accept_from_sock()
in the error handling case.

Fixes: 6cde210a97 ("fs: dlm: add helper for init connection")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David Teigland <teigland@redhat.com>
This commit is contained in:
Yang Yingliang 2021-03-27 16:37:04 +08:00 committed by David Teigland
parent 9d232469bc
commit 2fd8db2dd0

View File

@ -931,6 +931,7 @@ static int accept_from_sock(struct listen_connection *con)
result = dlm_con_init(othercon, nodeid);
if (result < 0) {
kfree(othercon);
mutex_unlock(&newcon->sock_mutex);
goto accept_err;
}