diff options
author | Tom Tucker <tom@opengridcomputing.com> | 2008-04-30 20:44:39 -0500 |
---|---|---|
committer | Tom Tucker <tom@opengridcomputing.com> | 2008-05-19 07:33:52 -0500 |
commit | 8740767376b32a7772607e1b2b07cde0c24120cc (patch) | |
tree | 62e9831548e0cdd2e70951a9ab9df4b93ca440aa /include/linux/sunrpc | |
parent | 02e7452de74d308ca642f54f7e5ef801ced60a92 (diff) |
svcrdma: Use standard Linux lists for context cache
Replace the one-off linked list implementation used to implement the
context cache with the standard Linux list_head lists. Add a context
counter to catch resource leaks. A WARN_ON will be added later to
ensure that we've freed all contexts.
Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/svc_rdma.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/sunrpc/svc_rdma.h b/include/linux/sunrpc/svc_rdma.h index c447c417b37..701439064d2 100644 --- a/include/linux/sunrpc/svc_rdma.h +++ b/include/linux/sunrpc/svc_rdma.h @@ -72,7 +72,7 @@ extern atomic_t rdma_stat_sq_prod; */ struct svc_rdma_op_ctxt { struct svc_rdma_op_ctxt *read_hdr; - struct svc_rdma_op_ctxt *next; + struct list_head free_list; struct xdr_buf arg; struct list_head dto_q; enum ib_wr_opcode wr_op; @@ -104,7 +104,8 @@ struct svcxprt_rdma { struct ib_pd *sc_pd; - struct svc_rdma_op_ctxt *sc_ctxt_head; + atomic_t sc_ctxt_used; + struct list_head sc_ctxt_free; int sc_ctxt_cnt; int sc_ctxt_bump; int sc_ctxt_max; |