mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 23:58:05 +00:00
RDMA/rtrs-srv: Init wr_cnt as 1
Fix up wr_avail accounting. if wr_cnt is 0, then we do SIGNAL for first
wr, in completion we add queue_depth back, which is not right in the
sense of tracking for available wr.
So fix it by init wr_cnt to 1.
Fixes: 9cb8374804
("RDMA/rtrs: server: main functionality")
Link: https://lore.kernel.org/r/20201217141915.56989-19-jinpu.wang@cloud.ionos.com
Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: Gioh Kim <gi-oh.kim@cloud.ionos.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
parent
e8ae7ddb48
commit
6f5d1b3016
1 changed files with 1 additions and 1 deletions
|
@ -1603,7 +1603,7 @@ static int create_con(struct rtrs_srv_sess *sess,
|
|||
con->c.cm_id = cm_id;
|
||||
con->c.sess = &sess->s;
|
||||
con->c.cid = cid;
|
||||
atomic_set(&con->wr_cnt, 0);
|
||||
atomic_set(&con->wr_cnt, 1);
|
||||
|
||||
if (con->c.cid == 0) {
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue