diff options
author | Tom Tucker <tom@opengridcomputing.com> | 2009-01-05 12:12:52 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-01-07 15:40:45 -0500 |
commit | 2779e3ae39645515cb6c1126634f47c28c9e7190 (patch) | |
tree | e7904837510ba41552a11ebd21caaaf336281462 /net/sunrpc/svc_xprt.c | |
parent | f05ef8db1abe68e3f6fc272efee51bc54ce528c5 (diff) |
svc: Move kfree of deferral record to common code
The rqstp structure has a pointer to a svc_deferred_req record
that is allocated when requests are deferred. This record is common
to all transports and can be freed in common code.
Move the kfree of the rq_deferred to the common svc_xprt_release
function.
This also fixes a memory leak in the RDMA transport which does not
kfree the dr structure in it's version of the xpo_release_rqst callback.
Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'net/sunrpc/svc_xprt.c')
-rw-r--r-- | net/sunrpc/svc_xprt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index 3fe4f1004278..29619612b9f1 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c | |||
@@ -448,6 +448,9 @@ static void svc_xprt_release(struct svc_rqst *rqstp) | |||
448 | 448 | ||
449 | rqstp->rq_xprt->xpt_ops->xpo_release_rqst(rqstp); | 449 | rqstp->rq_xprt->xpt_ops->xpo_release_rqst(rqstp); |
450 | 450 | ||
451 | kfree(rqstp->rq_deferred); | ||
452 | rqstp->rq_deferred = NULL; | ||
453 | |||
451 | svc_free_res_pages(rqstp); | 454 | svc_free_res_pages(rqstp); |
452 | rqstp->rq_res.page_len = 0; | 455 | rqstp->rq_res.page_len = 0; |
453 | rqstp->rq_res.page_base = 0; | 456 | rqstp->rq_res.page_base = 0; |