diff options
author | glebius <glebius@FreeBSD.org> | 2014-09-04 19:27:30 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2014-09-04 19:27:30 +0000 |
commit | 0e01998d71b48196fa1bc93fec7e9b08501daff5 (patch) | |
tree | 6b8e717e747b30ea9cb954fd84c136b4a8d7fbea /sys/kern/uipc_mbuf.c | |
parent | 01ecfa68a7f67b695cc2e6c331a59ce8b4b6b24b (diff) | |
download | FreeBSD-src-0e01998d71b48196fa1bc93fec7e9b08501daff5.zip FreeBSD-src-0e01998d71b48196fa1bc93fec7e9b08501daff5.tar.gz |
Change a very strange code in m_demote() to simple assertion.
Sponsored by: Nginx, Inc.
Diffstat (limited to 'sys/kern/uipc_mbuf.c')
-rw-r--r-- | sys/kern/uipc_mbuf.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index f3ea19f..32342689 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -393,17 +393,13 @@ m_demote(struct mbuf *m0, int all) struct mbuf *m; for (m = all ? m0 : m0->m_next; m != NULL; m = m->m_next) { + KASSERT(m->m_nextpkt == NULL, ("%s: m_nextpkt in m %p, m0 %p", + __func__, m, m0)); if (m->m_flags & M_PKTHDR) { m_tag_delete_chain(m, NULL); m->m_flags &= ~M_PKTHDR; bzero(&m->m_pkthdr, sizeof(struct pkthdr)); } - if (m != m0 && m->m_nextpkt != NULL) { - KASSERT(m->m_nextpkt == NULL, - ("%s: m_nextpkt not NULL", __func__)); - m_freem(m->m_nextpkt); - m->m_nextpkt = NULL; - } m->m_flags = m->m_flags & (M_EXT|M_RDONLY|M_NOFREE); } } |