summaryrefslogtreecommitdiff
path: root/net/sunrpc/sched.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2022-03-15 06:05:07 +0300
committerTrond Myklebust <trond.myklebust@hammerspace.com>2022-03-22 22:52:55 +0300
commitd0afde5fc6fb13531e2434fc4b6a65f131671f68 (patch)
tree90d087e580835927d01d24447bbdc5d876a9a070 /net/sunrpc/sched.c
parent2790a624d43084de590884934969e19c7a82316a (diff)
downloadlinux-d0afde5fc6fb13531e2434fc4b6a65f131671f68.tar.xz
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: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'net/sunrpc/sched.c')
0 files changed, 0 insertions, 0 deletions