summaryrefslogtreecommitdiffstats
path: root/net/rds
diff options
context:
space:
mode:
authorGerd Rausch <gerd.rausch@oracle.com>2019-07-16 15:29:12 -0700
committerDavid S. Miller <davem@davemloft.net>2019-07-17 12:06:52 -0700
commit9547dff1085d5935d6070377023096821033e30c (patch)
treed4ef0c90a0cc78c5012bec93af8111044723456c /net/rds
parentaea01a2234d26ffa9d9ee01e43705824c0c7b08a (diff)
downloadlinux-9547dff1085d5935d6070377023096821033e30c.tar.bz2
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. Signed-off-by: Gerd Rausch <gerd.rausch@oracle.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds')
-rw-r--r--net/rds/ib_frmr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/rds/ib_frmr.c b/net/rds/ib_frmr.c
index 708c553c3da5..adaa8e99e5a9 100644
--- a/net/rds/ib_frmr.c
+++ b/net/rds/ib_frmr.c
@@ -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);
}