]> git.baikalelectronics.ru Git - kernel.git/commit
SUNRPC: Fix up xprt_write_space()
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 17 Apr 2008 22:52:19 +0000 (18:52 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Sat, 19 Apr 2008 20:52:44 +0000 (16:52 -0400)
commitf0db73ad27d56dc116da8d5a4f4a2cac79bbdd1e
treedd12c31555cf9449dd6094428d377186b3c4c373
parent9340deb2083066e9de5cf5c505e21d375d93902e
SUNRPC: Fix up xprt_write_space()

The rest of the networking layer uses SOCK_ASYNC_NOSPACE to signal whether
or not we have someone waiting for buffer memory. Convert the SUNRPC layer
to use the same idiom.
Remove the unlikely()s in xs_udp_write_space and xs_tcp_write_space. In
fact, the most common case will be that there is nobody waiting for buffer
space.

SOCK_NOSPACE is there to tell the TCP layer whether or not the cwnd was
limited by the application window. Ensure that we follow the same idiom as
the rest of the networking layer here too.

Finally, ensure that we clear SOCK_ASYNC_NOSPACE once we wake up, so that
write_space() doesn't keep waking things up on xprt->pending.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
include/linux/sunrpc/xprt.h
net/sunrpc/xprt.c
net/sunrpc/xprtsock.c