mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-14 10:09:48 +00:00
Revert 1.81; 1.19 fixed this already in a different way.
This commit is contained in:
parent
04073a7ec5
commit
9f5193ca0b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=89109
@ -422,9 +422,7 @@ sbreserve(sb, cc, so, td)
|
||||
* td will only be NULL when we're in an interrupt
|
||||
* (e.g. in tcp_input())
|
||||
*/
|
||||
if (sb_max < MSIZE + MCLBYTES)
|
||||
sb_max = MSIZE + MCLBYTES;
|
||||
if ((u_quad_t)cc > (u_quad_t)(MCLBYTES * (sb_max / (MSIZE + MCLBYTES))))
|
||||
if ((u_quad_t)cc > (u_quad_t)sb_max * MCLBYTES / (MSIZE + MCLBYTES))
|
||||
return (0);
|
||||
if (!chgsbsize(so->so_cred->cr_uidinfo, &sb->sb_hiwat, cc,
|
||||
td ? td->td_proc->p_rlimit[RLIMIT_SBSIZE].rlim_cur : RLIM_INFINITY)) {
|
||||
|
@ -422,9 +422,7 @@ sbreserve(sb, cc, so, td)
|
||||
* td will only be NULL when we're in an interrupt
|
||||
* (e.g. in tcp_input())
|
||||
*/
|
||||
if (sb_max < MSIZE + MCLBYTES)
|
||||
sb_max = MSIZE + MCLBYTES;
|
||||
if ((u_quad_t)cc > (u_quad_t)(MCLBYTES * (sb_max / (MSIZE + MCLBYTES))))
|
||||
if ((u_quad_t)cc > (u_quad_t)sb_max * MCLBYTES / (MSIZE + MCLBYTES))
|
||||
return (0);
|
||||
if (!chgsbsize(so->so_cred->cr_uidinfo, &sb->sb_hiwat, cc,
|
||||
td ? td->td_proc->p_rlimit[RLIMIT_SBSIZE].rlim_cur : RLIM_INFINITY)) {
|
||||
|
Loading…
Reference in New Issue
Block a user