diff options
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_acct.c | 1 | ||||
-rw-r--r-- | sys/kern/kern_alq.c | 1 | ||||
-rw-r--r-- | sys/kern/kern_ktrace.c | 1 | ||||
-rw-r--r-- | sys/kern/kern_sig.c | 1 | ||||
-rw-r--r-- | sys/kern/kern_time.c | 12 | ||||
-rw-r--r-- | sys/kern/uipc_usrreq.c | 4 | ||||
-rw-r--r-- | sys/kern/vfs_acl.c | 3 | ||||
-rw-r--r-- | sys/kern/vfs_default.c | 1 | ||||
-rw-r--r-- | sys/kern/vfs_extattr.c | 4 | ||||
-rw-r--r-- | sys/kern/vfs_syscalls.c | 24 | ||||
-rw-r--r-- | sys/kern/vfs_vnops.c | 9 | ||||
-rw-r--r-- | sys/kern/vnode_if.src | 10 |
12 files changed, 2 insertions, 69 deletions
diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c index d45e3b7..8355ca5 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 512f358..9f37244 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 6ccf2c0..6e680fb 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 7460c13..5c1d553 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -2984,7 +2984,6 @@ restart: 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 99c1a53..3aea2bd 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 517784a..6ddc837 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -457,10 +457,8 @@ restart: 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 760b0e7..6a7c461 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 1001497..2fe64b3 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 c8b59d9..18890b7 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 ad69698..202f2d1 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 @@ restart: &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 @@ restart: 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 @@ restart: 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 @@ restart: 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 @@ restart: 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 @@ restart: 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 @@ restart: 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 681c0eb..48a74ac 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -153,14 +153,10 @@ restart: #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 0e198bf..b7d9cb1 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 { |