--- src/sys/vfs/fdesc/fdesc_vfsops.c 2006/07/18 22:22:15 1.20 +++ src/sys/vfs/fdesc/fdesc_vfsops.c 2006/08/09 22:47:34 1.21 @@ -141,15 +141,16 @@ int fdesc_root(struct mount *mp, struct vnode **vpp) { struct vnode *vp; + int error; /* * Return locked reference to root. */ vp = VFSTOFDESC(mp)->f_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