diff options
Diffstat (limited to 'net/sunrpc/svcsock.c')
-rw-r--r-- | net/sunrpc/svcsock.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 305374d4fb98..7762b9f8a8b7 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -1193,7 +1193,9 @@ static int svc_tcp_has_wspace(struct svc_xprt *xprt) | |||
1193 | if (test_bit(XPT_LISTENER, &xprt->xpt_flags)) | 1193 | if (test_bit(XPT_LISTENER, &xprt->xpt_flags)) |
1194 | return 1; | 1194 | return 1; |
1195 | required = atomic_read(&xprt->xpt_reserved) + serv->sv_max_mesg; | 1195 | required = atomic_read(&xprt->xpt_reserved) + serv->sv_max_mesg; |
1196 | if (sk_stream_wspace(svsk->sk_sk) >= required) | 1196 | if (sk_stream_wspace(svsk->sk_sk) >= required || |
1197 | (sk_stream_min_wspace(svsk->sk_sk) == 0 && | ||
1198 | atomic_read(&xprt->xpt_reserved) == 0)) | ||
1197 | return 1; | 1199 | return 1; |
1198 | set_bit(SOCK_NOSPACE, &svsk->sk_sock->flags); | 1200 | set_bit(SOCK_NOSPACE, &svsk->sk_sock->flags); |
1199 | return 0; | 1201 | return 0; |