Include uvm_extern before including tmpfs in _KERNEL.
Use MIN() from <sys/param.h>
Also include rwlock for !KERNEL
Fix merge issue in unbound.
Free correct variable.