Don't initialize m->m_data to m->m_pktdat, this is already done by the

mbuf allocator.  That was the last remnant of such code in the kernel.
This commit is contained in:
Gleb Smirnoff 2020-04-17 05:59:38 +00:00
parent c17dd0e88b
commit 2ffded5e53

View File

@ -439,7 +439,6 @@ ngt_rint_bypass(struct tty *tp, const void *buf, size_t len)
* Odd, we have changed from non-bypass to bypass. It is * Odd, we have changed from non-bypass to bypass. It is
* unlikely but not impossible, flush the data first. * unlikely but not impossible, flush the data first.
*/ */
sc->m->m_data = sc->m->m_pktdat;
NG_SEND_DATA_ONLY(error, sc->hook, sc->m); NG_SEND_DATA_ONLY(error, sc->hook, sc->m);
sc->m = NULL; sc->m = NULL;
} }
@ -495,7 +494,6 @@ ngt_rint(struct tty *tp, char c, int flags)
/* Ship off mbuf if it's time */ /* Ship off mbuf if it's time */
if (sc->hotchar == -1 || c == sc->hotchar || m->m_len >= MHLEN) { if (sc->hotchar == -1 || c == sc->hotchar || m->m_len >= MHLEN) {
m->m_data = m->m_pktdat;
sc->m = NULL; sc->m = NULL;
NG_SEND_DATA_ONLY(error, sc->hook, m); /* Will queue */ NG_SEND_DATA_ONLY(error, sc->hook, m); /* Will queue */
} }