nullfs: plug vnode ref leak in null_vptocnp

The lower vnode is already referenced and nodeget is supposed to consume
the reference. Thus the extra vref call was causing a leak.

Reported by:	pho
Reviewed by:	kib
MFC after:	1 week
This commit is contained in:
mjg 2016-09-09 10:40:55 +00:00
parent a7717aaf30
commit 0f1a94c426

View File

@ -893,7 +893,6 @@ null_vptocnp(struct vop_vptocnp_args *ap)
vn_lock(vp, locked | LK_RETRY);
return (ENOENT);
}
vref(ldvp);
error = null_nodeget(vp->v_mount, ldvp, dvp);
if (error == 0) {
#ifdef DIAGNOSTIC