summaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/xprtrdma/svc_rdma_rw.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_rw.c b/net/sunrpc/xprtrdma/svc_rdma_rw.c
index 2121c9b4d275..48fe3b16b0d9 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_rw.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_rw.c
@@ -73,7 +73,8 @@ svc_rdma_get_rw_ctxt(struct svcxprt_rdma *rdma, unsigned int sges)
73 73
74 ctxt->rw_sg_table.sgl = ctxt->rw_first_sgl; 74 ctxt->rw_sg_table.sgl = ctxt->rw_first_sgl;
75 if (sg_alloc_table_chained(&ctxt->rw_sg_table, sges, 75 if (sg_alloc_table_chained(&ctxt->rw_sg_table, sges,
76 ctxt->rw_sg_table.sgl)) { 76 ctxt->rw_sg_table.sgl,
77 SG_CHUNK_SIZE)) {
77 kfree(ctxt); 78 kfree(ctxt);
78 ctxt = NULL; 79 ctxt = NULL;
79 } 80 }
@@ -84,7 +85,7 @@ out:
84static void svc_rdma_put_rw_ctxt(struct svcxprt_rdma *rdma, 85static void svc_rdma_put_rw_ctxt(struct svcxprt_rdma *rdma,
85 struct svc_rdma_rw_ctxt *ctxt) 86 struct svc_rdma_rw_ctxt *ctxt)
86{ 87{
87 sg_free_table_chained(&ctxt->rw_sg_table, true); 88 sg_free_table_chained(&ctxt->rw_sg_table, SG_CHUNK_SIZE);
88 89
89 spin_lock(&rdma->sc_rw_ctxt_lock); 90 spin_lock(&rdma->sc_rw_ctxt_lock);
90 list_add(&ctxt->rw_list, &rdma->sc_rw_ctxts); 91 list_add(&ctxt->rw_list, &rdma->sc_rw_ctxts);