diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2021-04-19 14:03:06 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2021-04-26 09:24:47 -0400 |
commit | 44438ad9ae22277a261f9fa4fdc6387a8ff50f2e (patch) | |
tree | 9336eeb0521e16756414aadd98df0f9539c7a5a1 /net | |
parent | f912af77e2c1ba25bd40534668b10da5b20f686a (diff) | |
download | linux-stable-44438ad9ae22277a261f9fa4fdc6387a8ff50f2e.tar.gz linux-stable-44438ad9ae22277a261f9fa4fdc6387a8ff50f2e.tar.bz2 linux-stable-44438ad9ae22277a261f9fa4fdc6387a8ff50f2e.zip |
xprtrdma: Clarify use of barrier in frwr_wc_localinv_done()
Clean up: The comment and the placement of the memory barrier is
confusing. Humans want to read the function statements from head
to tail.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/xprtrdma/frwr_ops.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/sunrpc/xprtrdma/frwr_ops.c b/net/sunrpc/xprtrdma/frwr_ops.c index bfc057fdb75f..af85cec0ce31 100644 --- a/net/sunrpc/xprtrdma/frwr_ops.c +++ b/net/sunrpc/xprtrdma/frwr_ops.c @@ -592,14 +592,16 @@ static void frwr_wc_localinv_done(struct ib_cq *cq, struct ib_wc *wc) struct rpcrdma_frwr *frwr = container_of(cqe, struct rpcrdma_frwr, fr_cqe); struct rpcrdma_mr *mr = container_of(frwr, struct rpcrdma_mr, frwr); - struct rpcrdma_rep *rep = mr->mr_req->rl_reply; + struct rpcrdma_rep *rep; /* WARNING: Only wr_cqe and status are reliable at this point */ trace_xprtrdma_wc_li_done(wc, &frwr->fr_cid); - frwr_mr_done(wc, mr); - /* Ensure @rep is generated before frwr_mr_done */ + /* Ensure that @rep is generated before the MR is released */ + rep = mr->mr_req->rl_reply; smp_rmb(); + + frwr_mr_done(wc, mr); rpcrdma_complete_rqst(rep); rpcrdma_flush_disconnect(cq->cq_context, wc); |