diff options
| -rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_rw.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_rw.c b/net/sunrpc/xprtrdma/svc_rdma_rw.c index c35753691960..65ee6fd60162 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_rw.c +++ b/net/sunrpc/xprtrdma/svc_rdma_rw.c | |||
| @@ -64,8 +64,7 @@ svc_rdma_get_rw_ctxt(struct svcxprt_rdma *rdma, unsigned int sges) | |||
| 64 | spin_unlock(&rdma->sc_rw_ctxt_lock); | 64 | spin_unlock(&rdma->sc_rw_ctxt_lock); |
| 65 | } else { | 65 | } else { |
| 66 | spin_unlock(&rdma->sc_rw_ctxt_lock); | 66 | spin_unlock(&rdma->sc_rw_ctxt_lock); |
| 67 | ctxt = kmalloc(sizeof(*ctxt) + | 67 | ctxt = kmalloc(struct_size(ctxt, rw_first_sgl, SG_CHUNK_SIZE), |
| 68 | SG_CHUNK_SIZE * sizeof(struct scatterlist), | ||
| 69 | GFP_KERNEL); | 68 | GFP_KERNEL); |
| 70 | if (!ctxt) | 69 | if (!ctxt) |
| 71 | goto out; | 70 | goto out; |
