diff options
-rw-r--r-- | net/sunrpc/xprtrdma/verbs.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index cd4c5f1d554a..6fb73ff26183 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c | |||
@@ -871,7 +871,7 @@ rpcrdma_buffer_create(struct rpcrdma_xprt *r_xprt) | |||
871 | } | 871 | } |
872 | 872 | ||
873 | INIT_LIST_HEAD(&buf->rb_recv_bufs); | 873 | INIT_LIST_HEAD(&buf->rb_recv_bufs); |
874 | for (i = 0; i < buf->rb_max_requests + 2; i++) { | 874 | for (i = 0; i < buf->rb_max_requests; i++) { |
875 | struct rpcrdma_rep *rep; | 875 | struct rpcrdma_rep *rep; |
876 | 876 | ||
877 | rep = rpcrdma_create_rep(r_xprt); | 877 | rep = rpcrdma_create_rep(r_xprt); |
@@ -989,8 +989,6 @@ rpcrdma_put_mw(struct rpcrdma_xprt *r_xprt, struct rpcrdma_mw *mw) | |||
989 | 989 | ||
990 | /* | 990 | /* |
991 | * Get a set of request/reply buffers. | 991 | * Get a set of request/reply buffers. |
992 | * | ||
993 | * Reply buffer (if available) is attached to send buffer upon return. | ||
994 | */ | 992 | */ |
995 | struct rpcrdma_req * | 993 | struct rpcrdma_req * |
996 | rpcrdma_buffer_get(struct rpcrdma_buffer *buffers) | 994 | rpcrdma_buffer_get(struct rpcrdma_buffer *buffers) |
@@ -1009,13 +1007,13 @@ rpcrdma_buffer_get(struct rpcrdma_buffer *buffers) | |||
1009 | 1007 | ||
1010 | out_reqbuf: | 1008 | out_reqbuf: |
1011 | spin_unlock(&buffers->rb_lock); | 1009 | spin_unlock(&buffers->rb_lock); |
1012 | pr_warn("RPC: %s: out of request buffers\n", __func__); | 1010 | pr_warn("rpcrdma: out of request buffers (%p)\n", buffers); |
1013 | return NULL; | 1011 | return NULL; |
1014 | out_repbuf: | 1012 | out_repbuf: |
1013 | list_add(&req->rl_free, &buffers->rb_send_bufs); | ||
1015 | spin_unlock(&buffers->rb_lock); | 1014 | spin_unlock(&buffers->rb_lock); |
1016 | pr_warn("RPC: %s: out of reply buffers\n", __func__); | 1015 | pr_warn("rpcrdma: out of reply buffers (%p)\n", buffers); |
1017 | req->rl_reply = NULL; | 1016 | return NULL; |
1018 | return req; | ||
1019 | } | 1017 | } |
1020 | 1018 | ||
1021 | /* | 1019 | /* |