mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 18:51:27 +00:00
Bug fix: SRQ availability counter is no longer decremented when ib_post_send() fails.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1388 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -781,7 +781,6 @@ static int srpt_post_send(struct srpt_rdma_ch *ch, struct srpt_ioctx *ioctx,
|
||||
|
||||
ret = -ENOMEM;
|
||||
if (atomic_dec_return(&ch->qp_wr_avail) < 0) {
|
||||
atomic_inc(&ch->qp_wr_avail);
|
||||
PRINT_ERROR("%s[%d]: SRQ full", __func__, __LINE__);
|
||||
goto out;
|
||||
}
|
||||
@@ -803,6 +802,8 @@ static int srpt_post_send(struct srpt_rdma_ch *ch, struct srpt_ioctx *ioctx,
|
||||
ret = ib_post_send(ch->qp, &wr, &bad_wr);
|
||||
|
||||
out:
|
||||
if (ret < 0)
|
||||
atomic_inc(&ch->qp_wr_avail);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user