diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index c07ddd6b52ef..136eec3b34d0 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -1103,29 +1103,6 @@ lookup_once(struct namei_state *state, error = 0; goto done; } - if (ndp->ni_rootdir != rootvnode) { - int retval; - - retval = vn_isunder(searchdir, ndp->ni_rootdir, l); - if (!retval) { - /* Oops! We got out of jail! */ - log(LOG_WARNING, - "chrooted pid %d uid %d (%s) " - "detected outside of its chroot\n", - p->p_pid, kauth_cred_geteuid(l->l_cred), - p->p_comm); - /* Put us at the jail root. */ - vrele(searchdir); - searchdir = NULL; - foundobj = ndp->ni_rootdir; - vref(foundobj); - vref(foundobj); - *newsearchdir_ret = foundobj; - *foundobj_ret = foundobj; - error = 0; - goto done; - } - } if ((searchdir->v_vflag & VV_ROOT) == 0 || (cnp->cn_flags & NOCROSSMOUNT)) break; diff --git a/sys/miscfs/genfs/layer_vnops.c b/sys/miscfs/genfs/layer_vnops.c index d47d6996aa61..c87d8e4d2c9c 100644 --- a/sys/miscfs/genfs/layer_vnops.c +++ b/sys/miscfs/genfs/layer_vnops.c @@ -796,7 +796,6 @@ layer_getpages(void *v) struct vnode *vp = ap->a_vp; struct mount *mp = vp->v_mount; int error; - krw_t op; KASSERT(rw_lock_held(vp->v_uobj.vmobjlock)); @@ -807,10 +806,6 @@ layer_getpages(void *v) KASSERT(vp->v_uobj.vmobjlock == ap->a_vp->v_uobj.vmobjlock); /* Just pass the request on to the underlying layer. */ - op = rw_lock_op(vp->v_uobj.vmobjlock); - rw_exit(vp->v_uobj.vmobjlock); - fstrans_start(mp); - rw_enter(vp->v_uobj.vmobjlock, op); if (mp == vp->v_mount) { /* Will release the lock. */ error = VCALL(ap->a_vp, VOFFSET(vop_getpages), ap); @@ -818,7 +813,6 @@ layer_getpages(void *v) rw_exit(vp->v_uobj.vmobjlock); error = ENOENT; } - fstrans_done(mp); return error; }