Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Jan 2017 23:44:05 +0000 (UTC)
From:      Ravi Pokala <rpokala@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r312442 - stable/10/sys/kern
Message-ID:  <201701192344.v0JNi5qQ003805@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rpokala
Date: Thu Jan 19 23:44:05 2017
New Revision: 312442
URL: https://svnweb.freebsd.org/changeset/base/312442

Log:
  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.

Modified:
  stable/10/sys/kern/uipc_mbuf2.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/kern/uipc_mbuf2.c
==============================================================================
--- stable/10/sys/kern/uipc_mbuf2.c	Thu Jan 19 23:42:51 2017	(r312441)
+++ stable/10/sys/kern/uipc_mbuf2.c	Thu Jan 19 23:44:05 2017	(r312442)
@@ -161,7 +161,7 @@ m_pulldown(struct mbuf *m, int off, int 
 	 * 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;
 
 	/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701192344.v0JNi5qQ003805>