diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2021-04-19 14:02:28 -0400 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2021-04-26 09:23:19 -0400 |
commit | 8b5292be6880025cb3789cc811d19b4b8f0bf786 (patch) | |
tree | 76e66478ef46ab2d2a1353614565e27e1f273214 | |
parent | eaf86e8cc85c4abf3e4a2a0d3f59af613d2bacab (diff) | |
download | linux-stable-8b5292be6880025cb3789cc811d19b4b8f0bf786.tar.gz linux-stable-8b5292be6880025cb3789cc811d19b4b8f0bf786.tar.bz2 linux-stable-8b5292be6880025cb3789cc811d19b4b8f0bf786.zip |
xprtrdma: Improve commentary around rpcrdma_reps_unmap()
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
-rw-r--r-- | net/sunrpc/xprtrdma/verbs.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index 2bc4589c37ce..baf4b8c99d4c 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c @@ -1041,6 +1041,10 @@ static void rpcrdma_rep_put(struct rpcrdma_buffer *buf, llist_add(&rep->rr_node, &buf->rb_free_reps); } +/* Caller must ensure the QP is quiescent (RQ is drained) before + * invoking this function, to guarantee rb_all_reps is not + * changing. + */ static void rpcrdma_reps_unmap(struct rpcrdma_xprt *r_xprt) { struct rpcrdma_buffer *buf = &r_xprt->rx_buf; @@ -1048,7 +1052,7 @@ static void rpcrdma_reps_unmap(struct rpcrdma_xprt *r_xprt) list_for_each_entry(rep, &buf->rb_all_reps, rr_all) { rpcrdma_regbuf_dma_unmap(rep->rr_rdmabuf); - rep->rr_temp = true; + rep->rr_temp = true; /* Mark this rep for destruction */ } } |