--- src/sys/vfs/portal/portal_vfsops.c 2006/07/18 22:22:16 1.21 +++ src/sys/vfs/portal/portal_vfsops.c 2006/08/09 22:47:36 1.22 @@ -196,15 +196,16 @@ static int portal_root(struct mount *mp, struct vnode **vpp) { struct vnode *vp; + int error; /* * Return locked reference to root. */ vp = VFSTOPORTAL(mp)->pm_root; - vref(vp); - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - *vpp = vp; - return (0); + error = vget(vp, LK_EXCLUSIVE | LK_RETRY); + if (error == 0) + *vpp = vp; + return (error); } static int