Commit 4690a87a authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] kNFSd: Set SOCK_NOSPACE when RPC server decides there is insufficient.

SOCK_NOSPACE is set, so we must set it when we want to get
a ->write_space callback.
parent 9f632054
...@@ -166,6 +166,7 @@ svc_sock_enqueue(struct svc_sock *svsk) ...@@ -166,6 +166,7 @@ svc_sock_enqueue(struct svc_sock *svsk)
goto out_unlock; goto out_unlock;
} }
set_bit(SOCK_NOSPACE, &svsk->sk_sock->flags);
if (((svsk->sk_reserved + serv->sv_bufsz)*2 if (((svsk->sk_reserved + serv->sv_bufsz)*2
> svc_sock_wspace(svsk)) > svc_sock_wspace(svsk))
&& !test_bit(SK_CLOSE, &svsk->sk_flags) && !test_bit(SK_CLOSE, &svsk->sk_flags)
...@@ -176,6 +177,7 @@ svc_sock_enqueue(struct svc_sock *svsk) ...@@ -176,6 +177,7 @@ svc_sock_enqueue(struct svc_sock *svsk)
svc_sock_wspace(svsk)); svc_sock_wspace(svsk));
goto out_unlock; goto out_unlock;
} }
clear_bit(SOCK_NOSPACE, &svsk->sk_sock->flags);
/* Mark socket as busy. It will remain in this state until the /* Mark socket as busy. It will remain in this state until the
* server has processed all pending data and put the socket back * server has processed all pending data and put the socket back
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment