Skip to content

Commit a8f688e

Browse files
chuckleveramschuma-ntap
authored andcommitted
xprtrdma: Return -ENOBUFS when no pages are available
The use of -EAGAIN in rpcrdma_convert_iovs() is a latent bug: the transport never calls xprt_write_space() when more pages become available. -ENOBUFS will trigger the correct "delay briefly and call again" logic. Fixes: 7a89f9c ("xprtrdma: Honor ->send_request API contract") Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: stable@vger.kernel.org # 4.8+ Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
1 parent efd81e9 commit a8f688e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/sunrpc/xprtrdma/rpc_rdma.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ rpcrdma_convert_iovs(struct rpcrdma_xprt *r_xprt, struct xdr_buf *xdrbuf,
231231
*/
232232
*ppages = alloc_page(GFP_ATOMIC);
233233
if (!*ppages)
234-
return -EAGAIN;
234+
return -ENOBUFS;
235235
}
236236
seg->mr_page = *ppages;
237237
seg->mr_offset = (char *)page_base;

0 commit comments

Comments
 (0)