diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2016-03-01 13:06:20 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2016-03-01 13:06:37 -0800 |
commit | bf36387ad394ad4fc93ad85fdd4a95dfa583556a (patch) | |
tree | b4c3ac4aee7be16136f8ed065ff0a8e8e1105db6 /net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | |
parent | 3e1eeb9808225fb050582a1fc9b5d8e00390581c (diff) | |
download | linux-stable-bf36387ad394ad4fc93ad85fdd4a95dfa583556a.tar.gz linux-stable-bf36387ad394ad4fc93ad85fdd4a95dfa583556a.tar.bz2 linux-stable-bf36387ad394ad4fc93ad85fdd4a95dfa583556a.zip |
svcrdma: svc_rdma_post_recv() should close connection on error
Clean up: Most svc_rdma_post_recv() call sites close the transport
connection when a receive cannot be posted. Wrap that in a common
helper.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Devesh Sharma <devesh.sharma@broadcom.com>
Tested-by: Devesh Sharma <devesh.sharma@broadcom.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/sunrpc/xprtrdma/svc_rdma_recvfrom.c')
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c index c8b8a8b4181e..acf15b8bca70 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c +++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c @@ -711,13 +711,5 @@ defer: return 0; repost: - ret = svc_rdma_post_recv(rdma_xprt, GFP_KERNEL); - if (ret) { - pr_err("svcrdma: could not post a receive buffer, err=%d.\n", - ret); - pr_err("svcrdma: closing transport %p.\n", rdma_xprt); - set_bit(XPT_CLOSE, &rdma_xprt->sc_xprt.xpt_flags); - ret = -ENOTCONN; - } - return ret; + return svc_rdma_repost_recv(rdma_xprt, GFP_KERNEL); } |