MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mb_free_notready

Function mb_free_notready

freebsd/kern/kern_mbuf.c:834–848  ·  view source on GitHub ↗

* Free "count" units of I/O from an mbuf chain. They could be held * in M_EXTPG or just as a normal mbuf. This code is intended to be * called in an error path (I/O error, closed connection, etc). */

Source from the content-addressed store, hash-verified

832 * called in an error path (I/O error, closed connection, etc).
833 */
834void
835mb_free_notready(struct mbuf *m, int count)
836{
837 int i;
838
839 for (i = 0; i < count && m != NULL; i++) {
840 if ((m->m_flags & M_EXTPG) != 0) {
841 m->m_epg_nrdy--;
842 if (m->m_epg_nrdy != 0)
843 continue;
844 }
845 m = m_free(m);
846 }
847 KASSERT(i == count, ("Removed only %d items from %p", i, m));
848}
849
850/*
851 * Compress an unmapped mbuf into a simple mbuf when it holds a small

Callers 3

tcp_usr_readyFunction · 0.85
sendfile_iodoneFunction · 0.85
ktls_encryptFunction · 0.85

Calls 1

m_freeFunction · 0.50

Tested by

no test coverage detected