diff --git a/sys/cddl/compat/opensolaris/sys/vnode.h b/sys/cddl/compat/opensolaris/sys/vnode.h index 616e11a90104..68288a76fa21 100644 --- a/sys/cddl/compat/opensolaris/sys/vnode.h +++ b/sys/cddl/compat/opensolaris/sys/vnode.h @@ -217,7 +217,6 @@ zfs_vn_rdwr(enum uio_rw rw, vnode_t *vp, caddr_t base, ssize_t len, vfslocked = VFS_LOCK_GIANT(vp->v_mount); if (rw == UIO_WRITE) { ioflag = IO_SYNC; - VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE); } else { ioflag = IO_DIRECT; } diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c index f213d101527c..7792f6e57900 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c @@ -4577,7 +4577,6 @@ vop_deleteextattr { ZFS_EXIT(zfsvfs); return (error); } - VOP_LEASE(nd.ni_dvp, td, ap->a_cred, LEASE_WRITE); error = VOP_REMOVE(nd.ni_dvp, vp, &nd.ni_cnd); vput(nd.ni_dvp); @@ -4639,7 +4638,6 @@ vop_setextattr { return (error); } - VOP_LEASE(vp, td, ap->a_cred, LEASE_WRITE); VATTR_NULL(&va); va.va_size = 0; error = VOP_SETATTR(vp, &va, ap->a_cred); diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c index b890da7913cc..215f9438f4de 100644 --- a/sys/fs/devfs/devfs_vnops.c +++ b/sys/fs/devfs/devfs_vnops.c @@ -1549,7 +1549,6 @@ static struct vop_vector devfs_specops = { .vop_create = VOP_PANIC, .vop_fsync = devfs_fsync, .vop_getattr = devfs_getattr, - .vop_lease = VOP_NULL, .vop_link = VOP_PANIC, .vop_mkdir = VOP_PANIC, .vop_mknod = VOP_PANIC, diff --git a/sys/fs/fifofs/fifo_vnops.c b/sys/fs/fifofs/fifo_vnops.c index c8bc5ab48c1c..66963bcb7432 100644 --- a/sys/fs/fifofs/fifo_vnops.c +++ b/sys/fs/fifofs/fifo_vnops.c @@ -118,7 +118,6 @@ struct vop_vector fifo_specops = { .vop_getattr = VOP_EBADF, .vop_ioctl = fifo_ioctl, .vop_kqfilter = fifo_kqfilter, - .vop_lease = VOP_NULL, .vop_link = VOP_PANIC, .vop_mkdir = VOP_PANIC, .vop_mknod = VOP_PANIC, diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index beaef2f94ec6..69165e353b23 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -805,10 +805,6 @@ unionfs_mkshadowdir(struct unionfs_mount *ump, struct vnode *udvp, if ((error = vn_start_write(udvp, &mp, V_WAIT | PCATCH))) goto unionfs_mkshadowdir_free_out; - if ((error = VOP_LEASE(udvp, td, cn.cn_cred, LEASE_WRITE))) { - vn_finished_write(mp); - goto unionfs_mkshadowdir_free_out; - } unionfs_create_uppervattr_core(ump, &lva, &va, td); error = VOP_MKDIR(udvp, &uvp, &cn, &va); @@ -874,8 +870,7 @@ unionfs_mkwhiteout(struct vnode *dvp, struct componentname *cnp, if ((error = vn_start_write(dvp, &mp, V_WAIT | PCATCH))) goto unionfs_mkwhiteout_free_out; - if (!(error = VOP_LEASE(dvp, td, td->td_ucred, LEASE_WRITE))) - error = VOP_WHITEOUT(dvp, &cn, CREATE); + error = VOP_WHITEOUT(dvp, &cn, CREATE); vn_finished_write(mp); @@ -949,9 +944,6 @@ unionfs_vn_create_on_upper(struct vnode **vpp, struct vnode *udvp, goto unionfs_vn_create_on_upper_free_out1; } - if ((error = VOP_LEASE(udvp, td, cred, LEASE_WRITE)) != 0) - goto unionfs_vn_create_on_upper_free_out1; - if ((error = VOP_CREATE(udvp, &vp, &cn, uvap)) != 0) goto unionfs_vn_create_on_upper_free_out1; @@ -999,10 +991,6 @@ unionfs_copyfile_core(struct vnode *lvp, struct vnode *uvp, uio.uio_segflg = UIO_SYSSPACE; uio.uio_offset = 0; - if ((error = VOP_LEASE(lvp, td, cred, LEASE_READ)) != 0) - return (error); - if ((error = VOP_LEASE(uvp, td, cred, LEASE_WRITE)) != 0) - return (error); buf = malloc(MAXBSIZE, M_TEMP, M_WAITOK); while (error == 0) { diff --git a/sys/fs/unionfs/union_vnops.c b/sys/fs/unionfs/union_vnops.c index d16851d883ea..8505cacc8f1a 100644 --- a/sys/fs/unionfs/union_vnops.c +++ b/sys/fs/unionfs/union_vnops.c @@ -901,27 +901,6 @@ unionfs_write(struct vop_write_args *ap) return (error); } -static int -unionfs_lease(struct vop_lease_args *ap) -{ - int error; - struct unionfs_node *unp; - struct vnode *vp; - - UNIONFS_INTERNAL_DEBUG("unionfs_lease: enter\n"); - - KASSERT_UNIONFS_VNODE(ap->a_vp); - - unp = VTOUNIONFS(ap->a_vp); - vp = (unp->un_uppervp != NULLVP ? unp->un_uppervp : unp->un_lowervp); - - error = VOP_LEASE(vp, ap->a_td, ap->a_cred, ap->a_flag); - - UNIONFS_INTERNAL_DEBUG("unionfs_lease: lease (%d)\n", error); - - return (error); -} - static int unionfs_ioctl(struct vop_ioctl_args *ap) { @@ -947,7 +926,7 @@ unionfs_ioctl(struct vop_ioctl_args *ap) error = VOP_IOCTL(ovp, ap->a_command, ap->a_data, ap->a_fflag, ap->a_cred, ap->a_td); - UNIONFS_INTERNAL_DEBUG("unionfs_ioctl: lease (%d)\n", error); + UNIONFS_INTERNAL_DEBUG("unionfs_ioctl: leave (%d)\n", error); return (error); } @@ -2461,7 +2440,6 @@ struct vop_vector unionfs_vnodeops = { .vop_getwritemount = unionfs_getwritemount, .vop_inactive = unionfs_inactive, .vop_ioctl = unionfs_ioctl, - .vop_lease = unionfs_lease, .vop_link = unionfs_link, .vop_listextattr = unionfs_listextattr, .vop_lock1 = unionfs_lock, diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c index d45e3b716a5b..8355ca51df41 100644 --- a/sys/kern/kern_acct.c +++ b/sys/kern/kern_acct.c @@ -436,7 +436,6 @@ acct_process(struct thread *td) * Write the accounting information to the file. */ vfslocked = VFS_LOCK_GIANT(acct_vp->v_mount); - VOP_LEASE(acct_vp, td, acct_cred, LEASE_WRITE); ret = vn_rdwr(UIO_WRITE, acct_vp, (caddr_t)&acct, sizeof (acct), (off_t)0, UIO_SYSSPACE, IO_APPEND|IO_UNIT, acct_cred, NOCRED, (int *)0, td); diff --git a/sys/kern/kern_alq.c b/sys/kern/kern_alq.c index 512f358b9365..9f3724409d94 100644 --- a/sys/kern/kern_alq.c +++ b/sys/kern/kern_alq.c @@ -293,7 +293,6 @@ alq_doio(struct alq *alq) vfslocked = VFS_LOCK_GIANT(vp->v_mount); vn_start_write(vp, &mp, V_WAIT); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - VOP_LEASE(vp, td, alq->aq_cred, LEASE_WRITE); /* * XXX: VOP_WRITE error checks are ignored. */ diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index 6ccf2c0fb69b..6e680fb76fe6 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -992,7 +992,6 @@ ktr_writerequest(struct thread *td, struct ktr_request *req) vfslocked = VFS_LOCK_GIANT(vp->v_mount); vn_start_write(vp, &mp, V_WAIT); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - (void)VOP_LEASE(vp, td, cred, LEASE_WRITE); #ifdef MAC error = mac_vnode_check_write(cred, NOCRED, vp); if (error == 0) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 7460c13caac9..5c1d5532ac46 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -2984,7 +2984,6 @@ coredump(struct thread *td) if (set_core_nodump_flag) vattr.va_flags = UF_NODUMP; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - VOP_LEASE(vp, td, cred, LEASE_WRITE); VOP_SETATTR(vp, &vattr, cred); VOP_UNLOCK(vp, 0); vn_finished_write(mp); diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 99c1a53b8853..3aea2bda8b6f 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -74,7 +74,6 @@ static uma_zone_t itimer_zone = NULL; static int settime(struct thread *, struct timeval *); static void timevalfix(struct timeval *); -static void no_lease_updatetime(int); static void itimer_start(void); static int itimer_init(void *, int, int); @@ -106,14 +105,6 @@ int itimespecfix(struct timespec *ts); SYSINIT(posix_timer, SI_SUB_P1003_1B, SI_ORDER_FIRST+4, itimer_start, NULL); -static void -no_lease_updatetime(deltat) - int deltat; -{ -} - -void (*lease_updatetime)(int) = no_lease_updatetime; - static int settime(struct thread *td, struct timeval *tv) { @@ -168,9 +159,6 @@ settime(struct thread *td, struct timeval *tv) ts.tv_nsec = tv->tv_usec * 1000; mtx_lock(&Giant); tc_setclock(&ts); - (void) splsoftclock(); - lease_updatetime(delta.tv_sec); - splx(s); resettodr(); mtx_unlock(&Giant); return (0); diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 517784a76187..6ddc8371a1da 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -457,10 +457,8 @@ uipc_bind(struct socket *so, struct sockaddr *nam, struct thread *td) error = mac_vnode_check_create(td->td_ucred, nd.ni_dvp, &nd.ni_cnd, &vattr); #endif - if (error == 0) { - VOP_LEASE(nd.ni_dvp, td, td->td_ucred, LEASE_WRITE); + if (error == 0) error = VOP_CREATE(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr); - } NDFREE(&nd, NDF_ONLY_PNBUF); vput(nd.ni_dvp); if (error) { diff --git a/sys/kern/vfs_acl.c b/sys/kern/vfs_acl.c index 760b0e77001e..6a7c461ded31 100644 --- a/sys/kern/vfs_acl.c +++ b/sys/kern/vfs_acl.c @@ -91,7 +91,6 @@ vacl_set_acl(struct thread *td, struct vnode *vp, acl_type_t type, error = vn_start_write(vp, &mp, V_WAIT | PCATCH); if (error != 0) return (error); - VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); #ifdef MAC error = mac_vnode_check_setacl(td->td_ucred, vp, type, &inkernacl); @@ -117,7 +116,6 @@ vacl_get_acl(struct thread *td, struct vnode *vp, acl_type_t type, struct acl inkernelacl; int error; - VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); #ifdef MAC error = mac_vnode_check_getacl(td->td_ucred, vp, type); @@ -146,7 +144,6 @@ vacl_delete(struct thread *td, struct vnode *vp, acl_type_t type) error = vn_start_write(vp, &mp, V_WAIT | PCATCH); if (error) return (error); - VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); #ifdef MAC error = mac_vnode_check_deleteacl(td->td_ucred, vp, type); diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 100149723970..2fe64b3deb71 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -98,7 +98,6 @@ struct vop_vector default_vnodeops = { .vop_ioctl = VOP_ENOTTY, .vop_kqfilter = vop_stdkqfilter, .vop_islocked = vop_stdislocked, - .vop_lease = VOP_NULL, .vop_lock1 = vop_stdlock, .vop_lookup = vop_nolookup, .vop_open = VOP_NULL, diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index c8b59d9d531f..18890b798d65 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -175,7 +175,6 @@ extattr_set_vp(struct vnode *vp, int attrnamespace, const char *attrname, error = vn_start_write(vp, &mp, V_WAIT | PCATCH); if (error) return (error); - VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); aiov.iov_base = data; @@ -341,7 +340,6 @@ extattr_get_vp(struct vnode *vp, int attrnamespace, const char *attrname, int error; VFS_ASSERT_GIANT(vp->v_mount); - VOP_LEASE(vp, td, td->td_ucred, LEASE_READ); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); /* @@ -522,7 +520,6 @@ extattr_delete_vp(struct vnode *vp, int attrnamespace, const char *attrname, error = vn_start_write(vp, &mp, V_WAIT | PCATCH); if (error) return (error); - VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); #ifdef MAC @@ -664,7 +661,6 @@ extattr_list_vp(struct vnode *vp, int attrnamespace, void *data, int error; VFS_ASSERT_GIANT(vp->v_mount); - VOP_LEASE(vp, td, td->td_ucred, LEASE_READ); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); auiop = NULL; diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index ad69698b196b..202f2d119d59 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -1161,7 +1161,6 @@ kern_openat(struct thread *td, int fd, char *path, enum uio_seg pathseg, if (flags & O_TRUNC) { if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) goto bad; - VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE); VATTR_NULL(&vat); vat.va_size = 0; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); @@ -1353,7 +1352,6 @@ kern_mknodat(struct thread *td, int fd, char *path, enum uio_seg pathseg, &nd.ni_cnd, &vattr); #endif if (!error) { - VOP_LEASE(nd.ni_dvp, td, td->td_ucred, LEASE_WRITE); if (whiteout) error = VOP_WHITEOUT(nd.ni_dvp, &nd.ni_cnd, CREATE); else { @@ -1460,7 +1458,6 @@ kern_mkfifoat(struct thread *td, int fd, char *path, enum uio_seg pathseg, if (error) goto out; #endif - VOP_LEASE(nd.ni_dvp, td, td->td_ucred, LEASE_WRITE); error = VOP_MKNOD(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr); if (error == 0) vput(nd.ni_vp); @@ -1606,8 +1603,6 @@ kern_linkat(struct thread *td, int fd1, int fd2, char *path1, char *path2, error = EEXIST; } else if ((error = vn_lock(vp, LK_EXCLUSIVE | LK_RETRY)) == 0) { - VOP_LEASE(nd.ni_dvp, td, td->td_ucred, LEASE_WRITE); - VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE); error = can_hardlink(vp, td->td_ucred); if (error == 0) #ifdef MAC @@ -1727,7 +1722,6 @@ kern_symlinkat(struct thread *td, char *path1, int fd, char *path2, if (error) goto out2; #endif - VOP_LEASE(nd.ni_dvp, td, td->td_ucred, LEASE_WRITE); error = VOP_SYMLINK(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr, syspath); if (error == 0) vput(nd.ni_vp); @@ -1787,7 +1781,6 @@ undelete(td, uap) return (error); goto restart; } - VOP_LEASE(nd.ni_dvp, td, td->td_ucred, LEASE_WRITE); error = VOP_WHITEOUT(nd.ni_dvp, &nd.ni_cnd, DELETE); NDFREE(&nd, NDF_ONLY_PNBUF); vput(nd.ni_dvp); @@ -1893,7 +1886,6 @@ kern_unlinkat(struct thread *td, int fd, char *path, enum uio_seg pathseg) if (error) goto out; #endif - VOP_LEASE(nd.ni_dvp, td, td->td_ucred, LEASE_WRITE); error = VOP_REMOVE(nd.ni_dvp, vp, &nd.ni_cnd); #ifdef MAC out: @@ -2667,7 +2659,6 @@ setfflags(td, vp, flags) if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) return (error); - VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); VATTR_NULL(&vattr); vattr.va_flags = flags; @@ -2795,7 +2786,6 @@ setfmode(td, vp, mode) if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) return (error); - VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); VATTR_NULL(&vattr); vattr.va_mode = mode & ALLPERMS; @@ -2958,7 +2948,6 @@ setfown(td, vp, uid, gid) if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) return (error); - VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); VATTR_NULL(&vattr); vattr.va_uid = uid; @@ -3172,7 +3161,6 @@ setutimes(td, vp, ts, numtimes, nullflag) if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) return (error); - VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); setbirthtime = 0; if (numtimes < 3 && !VOP_GETATTR(vp, &vattr, td->td_ucred) && @@ -3403,7 +3391,6 @@ kern_truncate(struct thread *td, char *path, enum uio_seg pathseg, off_t length) return (error); } NDFREE(&nd, NDF_ONLY_PNBUF); - VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); if (vp->v_type == VDIR) error = EISDIR; @@ -3647,13 +3634,6 @@ kern_renameat(struct thread *td, int oldfd, char *old, int newfd, char *new, #endif out: if (!error) { - VOP_LEASE(tdvp, td, td->td_ucred, LEASE_WRITE); - if (fromnd.ni_dvp != tdvp) { - VOP_LEASE(fromnd.ni_dvp, td, td->td_ucred, LEASE_WRITE); - } - if (tvp) { - VOP_LEASE(tvp, td, td->td_ucred, LEASE_WRITE); - } error = VOP_RENAME(fromnd.ni_dvp, fromnd.ni_vp, &fromnd.ni_cnd, tond.ni_dvp, tond.ni_vp, &tond.ni_cnd); NDFREE(&fromnd, NDF_ONLY_PNBUF); @@ -3779,7 +3759,6 @@ kern_mkdirat(struct thread *td, int fd, char *path, enum uio_seg segflg, if (error) goto out; #endif - VOP_LEASE(nd.ni_dvp, td, td->td_ucred, LEASE_WRITE); error = VOP_MKDIR(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr); #ifdef MAC out: @@ -3872,8 +3851,6 @@ kern_rmdirat(struct thread *td, int fd, char *path, enum uio_seg pathseg) return (error); goto restart; } - VOP_LEASE(nd.ni_dvp, td, td->td_ucred, LEASE_WRITE); - VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE); error = VOP_RMDIR(nd.ni_dvp, nd.ni_vp, &nd.ni_cnd); vn_finished_write(mp); out: @@ -4462,7 +4439,6 @@ fhopen(td, uap) vrele(vp); goto out; } - VOP_LEASE(vp, td, td->td_ucred, LEASE_WRITE); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); /* XXX */ #ifdef MAC /* diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 681c0eb39841..48a74aca1c10 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -153,14 +153,10 @@ vn_open_cred(ndp, flagp, cmode, cred, fp) #ifdef MAC error = mac_vnode_check_create(cred, ndp->ni_dvp, &ndp->ni_cnd, vap); - if (error == 0) { + if (error == 0) #endif - VOP_LEASE(ndp->ni_dvp, td, cred, LEASE_WRITE); error = VOP_CREATE(ndp->ni_dvp, &ndp->ni_vp, &ndp->ni_cnd, vap); -#ifdef MAC - } -#endif vput(ndp->ni_dvp); vn_finished_write(mp); if (error) { @@ -521,7 +517,6 @@ vn_read(fp, uio, active_cred, flags, td) if (fp->f_flag & O_DIRECT) ioflag |= IO_DIRECT; vfslocked = VFS_LOCK_GIANT(vp->v_mount); - VOP_LEASE(vp, td, fp->f_cred, LEASE_READ); /* * According to McKusick the vn lock was protecting f_offset here. * It is now protected by the FOFFSET_LOCKED flag. @@ -598,7 +593,6 @@ vn_write(fp, uio, active_cred, flags, td) if (vp->v_type != VCHR && (error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0) goto unlock; - VOP_LEASE(vp, td, fp->f_cred, LEASE_WRITE); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); if ((flags & FOF_OFFSET) == 0) uio->uio_offset = fp->f_offset; @@ -642,7 +636,6 @@ vn_truncate(fp, length, active_cred, td) VFS_UNLOCK_GIANT(vfslocked); return (error); } - VOP_LEASE(vp, td, active_cred, LEASE_WRITE); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); if (vp->v_type == VDIR) { error = EISDIR; diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src index 0e198bf7c7e3..b7d9cb1f9259 100644 --- a/sys/kern/vnode_if.src +++ b/sys/kern/vnode_if.src @@ -199,16 +199,6 @@ vop_write { }; -%% lease vp = = = - -vop_lease { - IN struct vnode *vp; - IN struct thread *td; - IN struct ucred *cred; - IN int flag; -}; - - %% ioctl vp U U U vop_ioctl { diff --git a/sys/nfs4client/nfs4_vnops.c b/sys/nfs4client/nfs4_vnops.c index acfd318e3354..af85494a13ea 100644 --- a/sys/nfs4client/nfs4_vnops.c +++ b/sys/nfs4client/nfs4_vnops.c @@ -173,7 +173,6 @@ struct vop_vector nfs4_vnodeops = { .vop_getpages = nfs_getpages, .vop_putpages = nfs_putpages, .vop_inactive = nfs_inactive, - .vop_lease = VOP_NULL, .vop_link = nfs4_link, .vop_lookup = nfs4_lookup, .vop_mkdir = nfs4_mkdir, diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c index b363429c7495..2093b3f56353 100644 --- a/sys/nfsclient/nfs_vnops.c +++ b/sys/nfsclient/nfs_vnops.c @@ -168,7 +168,6 @@ struct vop_vector nfs_vnodeops = { .vop_getpages = nfs_getpages, .vop_putpages = nfs_putpages, .vop_inactive = nfs_inactive, - .vop_lease = VOP_NULL, .vop_link = nfs_link, .vop_lookup = nfs_lookup, .vop_mkdir = nfs_mkdir, diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 2ad3eae04ad5..0a3d1dc40f8a 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -412,14 +412,6 @@ extern struct uma_zone *namei_zone; extern int prtactive; /* nonzero to call vprint() */ extern struct vattr va_null; /* predefined null vattr structure */ -/* - * Macro/function to check for client cache inconsistency w.r.t. leasing. - */ -#define LEASE_READ 0x1 /* Check lease for readers */ -#define LEASE_WRITE 0x2 /* Check lease for modifiers */ - -extern void (*lease_updatetime)(int deltat); - #define VI_LOCK(vp) mtx_lock(&(vp)->v_interlock) #define VI_LOCK_FLAGS(vp, flags) mtx_lock_flags(&(vp)->v_interlock, (flags)) #define VI_TRYLOCK(vp) mtx_trylock(&(vp)->v_interlock) @@ -587,8 +579,6 @@ struct uio; struct vattr; struct vnode; -extern int (*lease_check_hook)(struct vop_lease_args *); - /* cache_* may belong in namei.h. */ void cache_enter(struct vnode *dvp, struct vnode *vp, struct componentname *cnp); @@ -607,7 +597,6 @@ int insmntque1(struct vnode *vp, struct mount *mp, void (*dtr)(struct vnode *, void *), void *dtr_arg); int insmntque(struct vnode *vp, struct mount *mp); u_quad_t init_va_filerev(void); -int lease_check(struct vop_lease_args *ap); int speedup_syncer(void); #define textvp_fullpath(p, rb, rfb) \ vn_fullpath(FIRST_THREAD_IN_PROC(p), (p)->p_textvp, rb, rfb) diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c index b45532e50f84..a6e73f53c5fc 100644 --- a/sys/ufs/ffs/ffs_snapshot.c +++ b/sys/ufs/ffs/ffs_snapshot.c @@ -278,7 +278,6 @@ ffs_snapshot(mp, snapfile) return (error); goto restart; } - VOP_LEASE(nd.ni_dvp, td, KERNCRED, LEASE_WRITE); error = VOP_CREATE(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vat); VOP_UNLOCK(nd.ni_dvp, 0); if (error) {