Commit e172037b authored by Md Haris Iqbal's avatar Md Haris Iqbal Committed by Jason Gunthorpe

RDMA/rtrs: server: Use already dereferenced rtrs_sess structure

The rtrs_sess structure has already been extracted above from the
rtrs_srv_sess structure. Use that to avoid redundant dereferencing.

Fixes: 9cb83748 ("RDMA/rtrs: server: main functionality")
Link: https://lore.kernel.org/r/20200522082833.1480551-1-haris.phnx@gmail.comSigned-off-by: default avatarMd Haris Iqbal <haris.phnx@gmail.com>
Acked-by: default avatarDanil Kipnis <danil.kipnis@cloud.ionos.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent cdb685cb
......@@ -1822,13 +1822,13 @@ static int rtrs_rdma_connect(struct rdma_cm_id *cm_id,
/*
* Sanity checks
*/
if (con_num != sess->s.con_num || cid >= sess->s.con_num) {
if (con_num != s->con_num || cid >= s->con_num) {
rtrs_err(s, "Incorrect request: %d, %d\n",
cid, con_num);
mutex_unlock(&srv->paths_mutex);
goto reject_w_econnreset;
}
if (sess->s.con[cid]) {
if (s->con[cid]) {
rtrs_err(s, "Connection already exists: %d\n",
cid);
mutex_unlock(&srv->paths_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment