Skip to contentSkip to conversation

net/rds: Set fr_state only to FRMR_IS_FREE if IB_WR_LOCAL_INV had been successful

PATCH In review Gerd Rausch 2 participants 2 messages Jul 16, 2019 – Jul 17, 2019

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v3 5/7 net/rds: Set fr_state only to FRMR_IS_FREE if IB_WR_LOCAL_INV had been 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.

---
 net/rds/ib_frmr.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
net/rds/ib_frmr.c +2 -1
index 708c553c3da5..adaa8e99e5a9 100644
@@ -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);
 	}
Signature · 1 line
2.22.0