svn commit: r276884 - head/sys/kern
Robert Watson
rwatson at FreeBSD.org
Fri Jan 9 12:08:52 UTC 2015
Author: rwatson
Date: Fri Jan 9 12:08:51 2015
New Revision: 276884
URL: https://svnweb.freebsd.org/changeset/base/276884
Log:
Remove a 'This is dumb' comment that has been incorrect for at least a
decade: m_pulldown() is willing to consider ordinary mbufs writable.
Retain another, related, and also outdated comment, but with a caveat
that it is partially stale. Do not, for now, address the problem that
it raises (that only EXT_CLUSTER external storage is considered
writable, regardless of the results of M_WRITABLE() on the mbuf).
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
Modified:
head/sys/kern/uipc_mbuf2.c
Modified: head/sys/kern/uipc_mbuf2.c
==============================================================================
--- head/sys/kern/uipc_mbuf2.c Fri Jan 9 10:59:49 2015 (r276883)
+++ head/sys/kern/uipc_mbuf2.c Fri Jan 9 12:08:51 2015 (r276884)
@@ -131,6 +131,8 @@ m_pulldown(struct mbuf *m, int off, int
}
/*
+ * The following comment is dated but still partially applies:
+ *
* XXX: This code is flawed because it considers a "writable" mbuf
* data region to require all of the following:
* (i) mbuf _has_ to have M_EXT set; if it is just a regular
@@ -148,10 +150,6 @@ m_pulldown(struct mbuf *m, int off, int
* M_WRITABLE(). For now, we only evaluate once at the beginning and
* live with this.
*/
- /*
- * XXX: This is dumb. If we're just a regular mbuf with no M_EXT,
- * then we're not "writable," according to this code.
- */
writable = 0;
if ((n->m_flags & M_EXT) == 0 ||
(n->m_ext.ext_type == EXT_CLUSTER && M_WRITABLE(n)))
More information about the svn-src-all
mailing list