Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Gerd Rausch and committed by
David S. Miller
9547dff1 aea01a22

+2 -1
+2 -1
net/rds/ib_frmr.c
··· 309 309 } 310 310 311 311 if (frmr->fr_inv) { 312 - frmr->fr_state = FRMR_IS_FREE; 312 + if (frmr->fr_state == FRMR_IS_INUSE) 313 + frmr->fr_state = FRMR_IS_FREE; 313 314 frmr->fr_inv = false; 314 315 wake_up(&frmr->fr_inv_done); 315 316 }