diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2018-05-04 15:35:46 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-03 11:24:54 +0200 |
commit | d097e5b5a1bc3cc601f11b61455210414c4f8b59 (patch) | |
tree | 439ea060214433905aadeb99bb2a0be00dc81115 /net | |
parent | 786c8d79f34f0c54d3f9028e994e397207ae769c (diff) | |
download | linux-exynos-d097e5b5a1bc3cc601f11b61455210414c4f8b59.tar.gz linux-exynos-d097e5b5a1bc3cc601f11b61455210414c4f8b59.tar.bz2 linux-exynos-d097e5b5a1bc3cc601f11b61455210414c4f8b59.zip |
xprtrdma: Return -ENOBUFS when no pages are available
commit a8f688ec437dc2045cc8f0c89fe877d5803850da upstream.
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: 7a89f9c626e3 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/xprtrdma/rpc_rdma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/xprtrdma/rpc_rdma.c b/net/sunrpc/xprtrdma/rpc_rdma.c index 491ae9fc561f..991d5a96f35b 100644 --- a/net/sunrpc/xprtrdma/rpc_rdma.c +++ b/net/sunrpc/xprtrdma/rpc_rdma.c @@ -229,7 +229,7 @@ rpcrdma_convert_iovs(struct rpcrdma_xprt *r_xprt, struct xdr_buf *xdrbuf, */ *ppages = alloc_page(GFP_ATOMIC); if (!*ppages) - return -EAGAIN; + return -ENOBUFS; } seg->mr_page = *ppages; seg->mr_offset = (char *)page_base; |