Skip to content

Commit

Permalink
xprtrdma: use complete() instead complete_all()
Browse files Browse the repository at this point in the history
There is only one waiter for the completion, therefore there
is no need to use complete_all(). Let's make that clear by
using complete() instead of complete_all().

The usage pattern of the completion is:

waiter context                          waker context

frwr_op_unmap_sync()
  reinit_completion()
  ib_post_send()
  wait_for_completion()

					frwr_wc_localinv_wake()
					  complete()

Signed-off-by: Daniel Wagner <[email protected]>
Cc: Anna Schumaker <[email protected]>
Cc: Trond Myklebust <[email protected]>
Cc: Chuck Lever <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Anna Schumaker <[email protected]>
  • Loading branch information
Daniel Wagner authored and amschuma-ntap committed Sep 23, 2016
1 parent 2a446a5 commit 5690a22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sunrpc/xprtrdma/frwr_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ frwr_wc_localinv_wake(struct ib_cq *cq, struct ib_wc *wc)
frmr = container_of(cqe, struct rpcrdma_frmr, fr_cqe);
if (wc->status != IB_WC_SUCCESS)
__frwr_sendcompletion_flush(wc, frmr, "localinv");
complete_all(&frmr->fr_linv_done);
complete(&frmr->fr_linv_done);
}

/* Post a REG_MR Work Request to register a memory region
Expand Down

0 comments on commit 5690a22

Please sign in to comment.