diff options
author | andre <andre@FreeBSD.org> | 2013-08-19 11:16:53 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2013-08-19 11:16:53 +0000 |
commit | e1092223ba2a73c4a5457df5da754502e8ac7500 (patch) | |
tree | 13e9b105b730d76c937752deb7e8e2c20af10e40 /sys/kern/uipc_mbuf.c | |
parent | fd76db45877685066364d0c4b173b1f41b3ee7ad (diff) | |
download | FreeBSD-src-e1092223ba2a73c4a5457df5da754502e8ac7500.zip FreeBSD-src-e1092223ba2a73c4a5457df5da754502e8ac7500.tar.gz |
Remove the unused M_NOFREE mbuf flag. It didn't have any in-tree users
for a very long time, if ever.
Should such a functionality ever be needed again the appropriate and
much better way to do it is through a custom EXT_SOMETHING external mbuf
type together with a dedicated *ext_free function.
Discussed with: trociny, glebius
Diffstat (limited to 'sys/kern/uipc_mbuf.c')
-rw-r--r-- | sys/kern/uipc_mbuf.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index f555adf..c67c9da 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -278,17 +278,10 @@ m_extadd(struct mbuf *mb, caddr_t buf, u_int size, void mb_free_ext(struct mbuf *m) { - int skipmbuf; KASSERT((m->m_flags & M_EXT) == M_EXT, ("%s: M_EXT not set", __func__)); KASSERT(m->m_ext.ref_cnt != NULL, ("%s: ref_cnt not set", __func__)); - - /* - * check if the header is embedded in the cluster - */ - skipmbuf = (m->m_flags & M_NOFREE); - /* Free attached storage if this mbuf is the only reference to it. */ if (*(m->m_ext.ref_cnt) == 1 || atomic_fetchadd_int(m->m_ext.ref_cnt, -1) == 1) { @@ -329,8 +322,6 @@ mb_free_ext(struct mbuf *m) ("%s: unknown ext_type", __func__)); } } - if (skipmbuf) - return; /* * Free this mbuf back to the mbuf zone with all m_ext @@ -395,7 +386,7 @@ m_demote(struct mbuf *m0, int all) m_freem(m->m_nextpkt); m->m_nextpkt = NULL; } - m->m_flags = m->m_flags & (M_EXT|M_RDONLY|M_NOFREE); + m->m_flags = m->m_flags & (M_EXT|M_RDONLY); } } |