RDMA/rtrs-srv: Release lock before call into close_sess

[ Upstream commit 99f0c3807973359bba8f37d9198eea59fe38c32a ]

In this error case, we don't need hold mutex to call close_sess.

Fixes: 9cb8374804 ("RDMA/rtrs: server: main functionality")
Link: https://lore.kernel.org/r/20201217141915.56989-4-jinpu.wang@cloud.ionos.com
Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Tested-by: Lutz Pogrell <lutz.pogrell@cloud.ionos.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Jack Wang 2020-12-17 15:18:59 +01:00 committed by Greg Kroah-Hartman
parent 0a131e09e4
commit e3d74840c7

View File

@ -1878,8 +1878,8 @@ static int rtrs_rdma_connect(struct rdma_cm_id *cm_id,
return rtrs_rdma_do_reject(cm_id, -ECONNRESET);
close_and_return_err:
close_sess(sess);
mutex_unlock(&srv->paths_mutex);
close_sess(sess);
return err;
}