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
This commit is contained in:
Robert Watson 2015-01-09 12:08:51 +00:00
parent 1e9685eeaa
commit 3df42f654e

View File

@ -131,6 +131,8 @@ m_pulldown(struct mbuf *m, int off, int len, int *offp)
}
/*
* 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 len, int *offp)
* 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)))