Author: rpokala
Date: Thu Jan 12 06:38:03 2017
New Revision: 311963
URL: https://svnweb.freebsd.org/changeset/base/311963

Log:
  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.
  
  Submitted by: Brian Mueller <bmuel...@panasas.com>
  Reviewed by:  bz
  MFC after:    1 week
  Sponsored by: Panasas
  Differential Revision:        https://reviews.freebsd.org/D9053

Modified:
  head/sys/kern/uipc_mbuf2.c

Modified: head/sys/kern/uipc_mbuf2.c
==============================================================================
--- head/sys/kern/uipc_mbuf2.c  Thu Jan 12 06:30:44 2017        (r311962)
+++ head/sys/kern/uipc_mbuf2.c  Thu Jan 12 06:38:03 2017        (r311963)
@@ -159,7 +159,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;
 
        /*
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to