MCLADDREFERENCE() incrementing the wrong ext_refcnt?

Edgar Fuß <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <Zf2nMR/[email protected]>
Hello.

I'm under the impression that MCLADDREFERENCE() may increment the wrong 
ext_refcnt.

In case it's permitted (I cant't find anything to the contrary) to 
call MCLADDREFERENCE(m1, m2) and then MCLADDREFERENCE(m2, m3), then the 
second call will increment m2's ext_refcnt where it should be incrementing 
m1's one (e.g. the one all of m1, m2 and m3's m_ext_ref are pointing to), no?

So I think
	atomic_inc_uint(&(o)->m_ext.ext_refcnt);			\
should really be
	atomic_inc_uint(&(o)->m_ext_ref->m_ext.ext_refcnt);		\
which, of course, is the same thing if MEXT_ISEMBEDDED(o) is true.

Am I getting something wrong?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.