Skip to content
Commit d0afde5f authored by Trond Myklebust's avatar Trond Myklebust
Browse files

SUNRPC: Improve accuracy of socket ENOBUFS determination



The current code checks for whether or not the socket is in a writeable
state after we get an EAGAIN. That is racy, since we've dropped the
socket lock, so the amount of free buffer may have changed.

Instead, let's check whether the socket is writeable before we try to
write to it. If that was the case, we do expect the message to be at
least partially sent unless we're in a low memory situation.

Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 2790a624
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