xprtrdma: Return -ENOBUFS when no pages are available
authorChuck Lever <chuck.lever@oracle.com>
Fri, 4 May 2018 19:35:46 +0000 (15:35 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Jul 2018 09:24:54 +0000 (11:24 +0200)
commitd097e5b5a1bc3cc601f11b61455210414c4f8b59
tree439ea060214433905aadeb99bb2a0be00dc81115
parent786c8d79f34f0c54d3f9028e994e397207ae769c
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>
net/sunrpc/xprtrdma/rpc_rdma.c