Skip to content

Commit

Permalink
net/rds: Set fr_state only to FRMR_IS_FREE if IB_WR_LOCAL_INV had bee…
Browse files Browse the repository at this point in the history
…n successful

Fix a bug where fr_state first goes to FRMR_IS_STALE, because of a failure
of operation IB_WR_LOCAL_INV, but then gets set back to "FRMR_IS_FREE"
uncoditionally, even though the operation failed.

Signed-off-by: Gerd Rausch <[email protected]>
Acked-by: Santosh Shilimkar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
gerd-rausch authored and davem330 committed Jul 17, 2019
1 parent aea01a2 commit 9547dff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/rds/ib_frmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ void rds_ib_mr_cqe_handler(struct rds_ib_connection *ic, struct ib_wc *wc)
}

if (frmr->fr_inv) {
frmr->fr_state = FRMR_IS_FREE;
if (frmr->fr_state == FRMR_IS_INUSE)
frmr->fr_state = FRMR_IS_FREE;
frmr->fr_inv = false;
wake_up(&frmr->fr_inv_done);
}
Expand Down

0 comments on commit 9547dff

Please sign in to comment.