diff options
author | Shirley Ma | 2014-05-28 16:34:24 +0200 |
---|---|---|
committer | Anna Schumaker | 2014-06-04 14:56:49 +0200 |
commit | 196c69989d84ab902bbe545f7bd8ce78ee74dac4 (patch) | |
tree | 0df67e1edb7853b3cf161685d19694a66ddc73ee /net | |
parent | xprtrdma: Remove Tavor MTU setting (diff) | |
download | kernel-qcow2-linux-196c69989d84ab902bbe545f7bd8ce78ee74dac4.tar.gz kernel-qcow2-linux-196c69989d84ab902bbe545f7bd8ce78ee74dac4.tar.xz kernel-qcow2-linux-196c69989d84ab902bbe545f7bd8ce78ee74dac4.zip |
xprtrdma: Allocate missing pagelist
GETACL relies on transport layer to alloc memory for reply buffer.
However xprtrdma assumes that the reply buffer (pagelist) has been
pre-allocated in upper layer. This problem was reported by IOL OFA lab
test on PPC.
Signed-off-by: Shirley Ma <shirley.ma@oracle.com>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Tested-by: Edward Mossman <emossman@iol.unh.edu>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/xprtrdma/rpc_rdma.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c index 436d229f31dc..dc4a826192b6 100644 --- a/net/sunrpc/xprtrdma/rpc_rdma.c +++ b/net/sunrpc/xprtrdma/rpc_rdma.c @@ -99,6 +99,12 @@ rpcrdma_convert_iovs(struct xdr_buf *xdrbuf, unsigned int pos, page_base = xdrbuf->page_base & ~PAGE_MASK; p = 0; while (len && n < nsegs) { + if (!ppages[p]) { + /* alloc the pagelist for receiving buffer */ + ppages[p] = alloc_page(GFP_ATOMIC); + if (!ppages[p]) + return 0; + } seg[n].mr_page = ppages[p]; seg[n].mr_offset = (void *)(unsigned long) page_base; seg[n].mr_len = min_t(u32, PAGE_SIZE - page_base, len); |