···208208 return xcl->xcl_ops->xpo_create(serv, net, sap, len, flags);209209}210210211211+/*212212+ * svc_xprt_received conditionally queues the transport for processing213213+ * by another thread. The caller must hold the XPT_BUSY bit and must214214+ * not thereafter touch transport data.215215+ *216216+ * Note: XPT_DATA only gets cleared when a read-attempt finds no (or217217+ * insufficient) data.218218+ */219219+static void svc_xprt_received(struct svc_xprt *xprt)220220+{221221+ BUG_ON(!test_bit(XPT_BUSY, &xprt->xpt_flags));222222+ /* As soon as we clear busy, the xprt could be closed and223223+ * 'put', so we need a reference to call svc_xprt_enqueue with:224224+ */225225+ svc_xprt_get(xprt);226226+ clear_bit(XPT_BUSY, &xprt->xpt_flags);227227+ svc_xprt_enqueue(xprt);228228+ svc_xprt_put(xprt);229229+}230230+211231void svc_add_new_perm_xprt(struct svc_serv *serv, struct svc_xprt *new)212232{213233 clear_bit(XPT_TEMP, &new->xpt_flags);···417397418398 return xprt;419399}420420-421421-/*422422- * svc_xprt_received conditionally queues the transport for processing423423- * by another thread. The caller must hold the XPT_BUSY bit and must424424- * not thereafter touch transport data.425425- *426426- * Note: XPT_DATA only gets cleared when a read-attempt finds no (or427427- * insufficient) data.428428- */429429-void svc_xprt_received(struct svc_xprt *xprt)430430-{431431- BUG_ON(!test_bit(XPT_BUSY, &xprt->xpt_flags));432432- /* As soon as we clear busy, the xprt could be closed and433433- * 'put', so we need a reference to call svc_xprt_enqueue with:434434- */435435- svc_xprt_get(xprt);436436- clear_bit(XPT_BUSY, &xprt->xpt_flags);437437- svc_xprt_enqueue(xprt);438438- svc_xprt_put(xprt);439439-}440440-EXPORT_SYMBOL_GPL(svc_xprt_received);441400442401/**443402 * svc_reserve - change the space reserved for the reply to a request.
-4
net/sunrpc/xprtrdma/svc_rdma_transport.c
···578578 list_add_tail(&newxprt->sc_accept_q, &listen_xprt->sc_accept_q);579579 spin_unlock_bh(&listen_xprt->sc_lock);580580581581- /*582582- * Can't use svc_xprt_received here because we are not on a583583- * rqstp thread584584- */585581 set_bit(XPT_CONN, &listen_xprt->sc_xprt.xpt_flags);586582 svc_xprt_enqueue(&listen_xprt->sc_xprt);587583}