Re: [PATCH v3] xprtrdma: serialize unmap_sync with xprt_disconnect
"Chuck Lever" <[email protected]>
| Newsgroups | org.kernel.vger.linux-nfs,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Aug 21, 2026, at 7:48 PM, [email protected] wrote: > diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c > index 04b286223b24..b9ebfcbcabc5 100644 > --- a/net/sunrpc/xprtrdma/verbs.c > +++ b/net/sunrpc/xprtrdma/verbs.c > @@ -388,6 +387,14 @@ static noinline int rpcrdma_ep_put(struct rpcrdma_ep *ep) > return kref_put(&ep->re_kref, rpcrdma_ep_destroy); > } > > +void rpcrdma_ep_release(struct rpcrdma_ep *ep) > +{ > + struct rdma_cm_id *id = ep->re_id; > + > + if (rpcrdma_ep_put(ep)) > + rdma_destroy_id(id); > +} > + Nit: The new externally-visible functions need kdoc comments. rpcrdma_ep_put() is now static, so the kdoc comment there can be converted to non-kdoc-style. > @@ -601,6 +614,9 @@ void rpcrdma_xprt_disconnect(struct rpcrdma_xprt *r_xprt) > rdma_destroy_id(id); > > r_xprt->rx_ep = NULL; > + > +out_unlock: > + up_write(&r_xprt->rx_unmap_rwsem); > } Nit: rpcrdma_xprt_disconnect() retains if (rpcrdma_ep_put(ep)) rdma_destroy_id(id); but should call the new rpcrdma_ep_release() helper. The new block comments are wordy, and could be tightened. But no show-stoppers here: Reviewed-by: Chuck Lever <[email protected]> -- Chuck Lever