Merge from projects/sendfile:

Use sbcut_locked() instead of manually editing a sockbuf.

Sponsored by:	Nginx, Inc.
This commit is contained in:
Gleb Smirnoff 2014-11-14 15:33:40 +00:00
parent 124cd6410c
commit 6bf6b25e88
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=274504

View File

@ -1809,9 +1809,7 @@ soreceive_generic(struct socket *so, struct sockaddr **psa, struct uio *uio,
SOCKBUF_LOCK(&so->so_rcv);
}
}
m->m_data += len;
m->m_len -= len;
so->so_rcv.sb_cc -= len;
sbcut_locked(&so->so_rcv, len);
}
}
SOCKBUF_LOCK_ASSERT(&so->so_rcv);