Unnecessary check in mb_zinit_pack()?

Renaud Lienhart renaud at vmware.com
Fri Sep 19 18:51:39 UTC 2008


It seems there is a redundant check in mb_zinit_pack():

	if (uma_zalloc_arg(zone_clust, m, how) == NULL ||
	    m->m_ext.ext_buf == NULL)
		return (ENOMEM);

If uma_zalloc_arg() successfully allocates a cluster then shouldn't
m->m_ext.ext_buf be guaranteed not to be NULL?

I can't find any rationale for the second check; I removed it from my
private tree, moved it into a KASSERT() and didn't run into any problem
so far.

Am I missing something?

Thanks,

	Renaud Lienhart


More information about the freebsd-net mailing list