diff options
author | rpokala <rpokala@FreeBSD.org> | 2017-01-19 23:44:05 +0000 |
---|---|---|
committer | rpokala <rpokala@FreeBSD.org> | 2017-01-19 23:44:05 +0000 |
commit | 2e2a1b132816b5cd5d9a0d3a4357e28e5fc40ffb (patch) | |
tree | 5ed3b1ddac1c626f02d453e329d638fbbcaab300 /sys/kern | |
parent | 3d43d47e2dfb79e5d3abb61fc33c636d37e8b842 (diff) | |
download | FreeBSD-src-2e2a1b132816b5cd5d9a0d3a4357e28e5fc40ffb.zip FreeBSD-src-2e2a1b132816b5cd5d9a0d3a4357e28e5fc40ffb.tar.gz |
MFC r311963: Remove writability requirement for single-mbuf, contiguous-
range m_pulldown()
m_pulldown() only needs to determine if a mbuf is writable if it is going to
copy data into the data region of an existing mbuf. It does this to create a
contiguous data region in a single mbuf from multiple mbufs in the chain. If
the requested memory region is already contiguous and nothing needs to
change, the mbuf does not need to be writeable.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/uipc_mbuf2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/uipc_mbuf2.c b/sys/kern/uipc_mbuf2.c index 00472d3..f69b47e 100644 --- a/sys/kern/uipc_mbuf2.c +++ b/sys/kern/uipc_mbuf2.c @@ -161,7 +161,7 @@ m_pulldown(struct mbuf *m, int off, int len, int *offp) * the target data is on <n, off>. * if we got enough data on the mbuf "n", we're done. */ - if ((off == 0 || offp) && len <= n->m_len - off && writable) + if ((off == 0 || offp) && len <= n->m_len - off) goto ok; /* |