• Home
  • Raw
  • Download

Lines Matching refs:req

59 static void xprt_free_allocation(struct rpc_rqst *req)  in xprt_free_allocation()  argument
63 dprintk("RPC: free allocations for req= %p\n", req); in xprt_free_allocation()
64 WARN_ON_ONCE(test_bit(RPC_BC_PA_IN_USE, &req->rq_bc_pa_state)); in xprt_free_allocation()
65 xbufp = &req->rq_rcv_buf; in xprt_free_allocation()
67 xbufp = &req->rq_snd_buf; in xprt_free_allocation()
69 kfree(req); in xprt_free_allocation()
86 struct rpc_rqst *req; in xprt_alloc_bc_req() local
89 req = kzalloc(sizeof(*req), gfp_flags); in xprt_alloc_bc_req()
90 if (req == NULL) in xprt_alloc_bc_req()
93 req->rq_xprt = xprt; in xprt_alloc_bc_req()
94 INIT_LIST_HEAD(&req->rq_list); in xprt_alloc_bc_req()
95 INIT_LIST_HEAD(&req->rq_bc_list); in xprt_alloc_bc_req()
98 if (xprt_alloc_xdr_buf(&req->rq_rcv_buf, gfp_flags) < 0) { in xprt_alloc_bc_req()
102 req->rq_rcv_buf.len = PAGE_SIZE; in xprt_alloc_bc_req()
105 if (xprt_alloc_xdr_buf(&req->rq_snd_buf, gfp_flags) < 0) { in xprt_alloc_bc_req()
109 return req; in xprt_alloc_bc_req()
111 xprt_free_allocation(req); in xprt_alloc_bc_req()
143 struct rpc_rqst *req; in xprt_setup_bc() local
160 req = xprt_alloc_bc_req(xprt, GFP_KERNEL); in xprt_setup_bc()
161 if (req == NULL) { in xprt_setup_bc()
167 dprintk("RPC: adding req= %p\n", req); in xprt_setup_bc()
168 list_add(&req->rq_bc_pa_list, &tmp_list); in xprt_setup_bc()
187 req = list_first_entry(&tmp_list, in xprt_setup_bc()
190 list_del(&req->rq_bc_pa_list); in xprt_setup_bc()
191 xprt_free_allocation(req); in xprt_setup_bc()
216 struct rpc_rqst *req = NULL, *tmp = NULL; in xprt_destroy_bc() local
225 list_for_each_entry_safe(req, tmp, &xprt->bc_pa_list, rq_bc_pa_list) { in xprt_destroy_bc()
226 dprintk("RPC: req=%p\n", req); in xprt_destroy_bc()
227 list_del(&req->rq_bc_pa_list); in xprt_destroy_bc()
228 xprt_free_allocation(req); in xprt_destroy_bc()
241 struct rpc_rqst *req = NULL; in xprt_alloc_bc_request() local
247 req = xprt_alloc_bc_req(xprt, GFP_ATOMIC); in xprt_alloc_bc_request()
248 if (!req) in xprt_alloc_bc_request()
250 list_add_tail(&req->rq_bc_pa_list, &xprt->bc_pa_list); in xprt_alloc_bc_request()
253 req = list_first_entry(&xprt->bc_pa_list, struct rpc_rqst, in xprt_alloc_bc_request()
255 req->rq_reply_bytes_recvd = 0; in xprt_alloc_bc_request()
256 req->rq_bytes_sent = 0; in xprt_alloc_bc_request()
257 memcpy(&req->rq_private_buf, &req->rq_rcv_buf, in xprt_alloc_bc_request()
258 sizeof(req->rq_private_buf)); in xprt_alloc_bc_request()
259 req->rq_xid = xid; in xprt_alloc_bc_request()
260 req->rq_connect_cookie = xprt->connect_cookie; in xprt_alloc_bc_request()
262 dprintk("RPC: backchannel req=%p\n", req); in xprt_alloc_bc_request()
263 return req; in xprt_alloc_bc_request()
270 void xprt_free_bc_request(struct rpc_rqst *req) in xprt_free_bc_request() argument
272 struct rpc_xprt *xprt = req->rq_xprt; in xprt_free_bc_request()
274 xprt->ops->bc_free_rqst(req); in xprt_free_bc_request()
277 void xprt_free_bc_rqst(struct rpc_rqst *req) in xprt_free_bc_rqst() argument
279 struct rpc_xprt *xprt = req->rq_xprt; in xprt_free_bc_rqst()
281 dprintk("RPC: free backchannel req=%p\n", req); in xprt_free_bc_rqst()
283 req->rq_connect_cookie = xprt->connect_cookie - 1; in xprt_free_bc_rqst()
285 clear_bit(RPC_BC_PA_IN_USE, &req->rq_bc_pa_state); in xprt_free_bc_rqst()
294 list_add_tail(&req->rq_bc_pa_list, &xprt->bc_pa_list); in xprt_free_bc_rqst()
296 req = NULL; in xprt_free_bc_rqst()
299 if (req != NULL) { in xprt_free_bc_rqst()
306 dprintk("RPC: Last session removed req=%p\n", req); in xprt_free_bc_rqst()
307 xprt_free_allocation(req); in xprt_free_bc_rqst()
325 struct rpc_rqst *req; in xprt_lookup_bc_request() local
328 list_for_each_entry(req, &xprt->bc_pa_list, rq_bc_pa_list) { in xprt_lookup_bc_request()
329 if (req->rq_connect_cookie != xprt->connect_cookie) in xprt_lookup_bc_request()
331 if (req->rq_xid == xid) in xprt_lookup_bc_request()
334 req = xprt_alloc_bc_request(xprt, xid); in xprt_lookup_bc_request()
337 return req; in xprt_lookup_bc_request()
346 void xprt_complete_bc_request(struct rpc_rqst *req, uint32_t copied) in xprt_complete_bc_request() argument
348 struct rpc_xprt *xprt = req->rq_xprt; in xprt_complete_bc_request()
352 list_del(&req->rq_bc_pa_list); in xprt_complete_bc_request()
356 req->rq_private_buf.len = copied; in xprt_complete_bc_request()
357 set_bit(RPC_BC_PA_IN_USE, &req->rq_bc_pa_state); in xprt_complete_bc_request()
361 list_add(&req->rq_bc_list, &bc_serv->sv_cb_list); in xprt_complete_bc_request()