mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
sendfile: Fix build for kernels without INET or INET6
Don't cap the new low watermark to a TCP-specific setting in kernels
without TCP.
Fixes: 6948f4d5e2 ("sendfile: keep the lowat hack more conservative")
This commit is contained in:
1 parent
c907302c12
commit
1d8c5f8e02
1 file changed
+4
@@ -660,7 +660,11 @@ sendfile_wait_generic(struct socket *so, off_t need, int *space)
|
||||
SOCK_SENDBUF_LOCK(so);
|
||||
lowat = so->so_snd.sb_lowat;
|
||||
if (so->so_snd.sb_flags & SB_AUTOLOWAT) {
|
||||
#if defined(INET) || defined(INET6)
|
||||
newlowat = min(V_tcp_sendspace, so->so_snd.sb_hiwat) / 2;
|
||||
#else
|
||||
newlowat = so->so_snd.sb_hiwat / 2;
|
||||
#endif
|
||||
if (so->so_snd.sb_lowat < newlowat)
|
||||
so->so_snd.sb_lowat = newlowat;
|
||||
if (so->so_snd.sb_lowat < PAGE_SIZE &&
|
||||
|
||||
Reference in new issue
Block a user