summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/adosfs/advnops.c10
-rw-r--r--sys/compat/netbsd/netbsd_misc.c4
-rw-r--r--sys/isofs/cd9660/cd9660_vnops.c9
-rw-r--r--sys/kern/kern_acct.c3
-rw-r--r--sys/kern/kern_sig.c3
-rw-r--r--sys/kern/spec_vnops.c3
-rw-r--r--sys/kern/uipc_usrreq.c3
-rw-r--r--sys/kern/vfs_default.c10
-rw-r--r--sys/kern/vfs_syscalls.c31
-rw-r--r--sys/kern/vfs_vnops.c8
-rw-r--r--sys/kern/vnode_if.src12
-rw-r--r--sys/miscfs/fifofs/fifo.h3
-rw-r--r--sys/miscfs/fifofs/fifo_vnops.c3
-rw-r--r--sys/miscfs/specfs/spec_vnops.c3
-rw-r--r--sys/miscfs/specfs/specdev.h3
-rw-r--r--sys/msdosfs/denode.h8
-rw-r--r--sys/msdosfs/msdosfs_vnops.c3
-rw-r--r--sys/nfs/nfs.h6
-rw-r--r--sys/nfs/nfs_vnops.c3
-rw-r--r--sys/nfs/nfsnode.h4
-rw-r--r--sys/sys/specdev.h3
-rw-r--r--sys/sys/vnode.h8
-rw-r--r--sys/ufs/ext2fs/ext2fs_vnops.c3
-rw-r--r--sys/ufs/ffs/ffs_vnops.c3
-rw-r--r--sys/ufs/ufs/ufs_extern.h8
-rw-r--r--sys/xfs/xfs_vopdefs.h2
26 files changed, 25 insertions, 134 deletions
diff --git a/sys/adosfs/advnops.c b/sys/adosfs/advnops.c
index 836bb0d0ec6..897e931cc61 100644
--- a/sys/adosfs/advnops.c
+++ b/sys/adosfs/advnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: advnops.c,v 1.32 2006/01/20 23:27:24 miod Exp $ */
+/* $OpenBSD: advnops.c,v 1.33 2007/01/16 17:52:18 thib Exp $ */
/* $NetBSD: advnops.c,v 1.32 1996/10/13 02:52:09 christos Exp $ */
/*
@@ -78,13 +78,6 @@ int adenotsup(void *);
#define adosfs_close adnullop
#define adosfs_fsync adnullop
-#ifdef NFSSERVER
-int lease_check(void *);
-#define adosfs_lease_check lease_check
-#else
-#define adosfs_lease_check adnullop
-#endif
-
#define adosfs_bwrite adenotsup
#define adosfs_create adenotsup
#define adosfs_mkdir adenotsup
@@ -106,7 +99,6 @@ struct vnodeopv_entry_desc adosfs_vnodeop_entries[] = {
{ &vop_setattr_desc, adosfs_setattr }, /* setattr */
{ &vop_read_desc, adosfs_read }, /* read */
{ &vop_write_desc, adosfs_write }, /* write */
- { &vop_lease_desc, adosfs_lease_check }, /* lease */
{ &vop_ioctl_desc, adosfs_ioctl }, /* ioctl */
{ &vop_poll_desc, adosfs_poll }, /* poll */
{ &vop_fsync_desc, adosfs_fsync }, /* fsync */
diff --git a/sys/compat/netbsd/netbsd_misc.c b/sys/compat/netbsd/netbsd_misc.c
index 627c5cb1d83..8bf0f9d0843 100644
--- a/sys/compat/netbsd/netbsd_misc.c
+++ b/sys/compat/netbsd/netbsd_misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netbsd_misc.c,v 1.14 2004/11/23 19:08:54 miod Exp $ */
+/* $OpenBSD: netbsd_misc.c,v 1.15 2007/01/16 17:52:18 thib Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -98,7 +98,6 @@ netbsd_sys_lchmod(p, v, retval)
if ((error = namei(&nd)) != 0)
return (error);
vp = nd.ni_vp;
- VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
if (vp->v_mount->mnt_flag & MNT_RDONLY)
error = EROFS;
@@ -148,7 +147,6 @@ netbsd_sys_lutimes(p, v, retval)
if ((error = namei(&nd)) != 0)
return (error);
vp = nd.ni_vp;
- VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
if (vp->v_mount->mnt_flag & MNT_RDONLY)
error = EROFS;
diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c
index 7bb6d23ff28..6502c58573e 100644
--- a/sys/isofs/cd9660/cd9660_vnops.c
+++ b/sys/isofs/cd9660/cd9660_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd9660_vnops.c,v 1.37 2006/12/29 13:04:37 pedro Exp $ */
+/* $OpenBSD: cd9660_vnops.c,v 1.38 2007/01/16 17:52:18 thib Exp $ */
/* $NetBSD: cd9660_vnops.c,v 1.42 1997/10/16 23:56:57 christos Exp $ */
/*-
@@ -1016,12 +1016,6 @@ cd9660_pathconf(v)
#define cd9660_create eopnotsupp
#define cd9660_mknod eopnotsupp
#define cd9660_write eopnotsupp
-#ifdef NFSSERVER
-int lease_check(void *);
-#define cd9660_lease_check lease_check
-#else
-#define cd9660_lease_check nullop
-#endif
#define cd9660_fsync nullop
#define cd9660_remove eopnotsupp
#define cd9660_rename eopnotsupp
@@ -1051,7 +1045,6 @@ struct vnodeopv_entry_desc cd9660_vnodeop_entries[] = {
{ &vop_setattr_desc, cd9660_setattr }, /* setattr */
{ &vop_read_desc, cd9660_read }, /* read */
{ &vop_write_desc, cd9660_write }, /* write */
- { &vop_lease_desc, cd9660_lease_check },/* lease */
{ &vop_ioctl_desc, cd9660_ioctl }, /* ioctl */
{ &vop_poll_desc, cd9660_poll }, /* poll */
{ &vop_revoke_desc, cd9660_revoke }, /* revoke */
diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c
index 0a229b2ebc3..262cda6a6c0 100644
--- a/sys/kern/kern_acct.c
+++ b/sys/kern/kern_acct.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_acct.c,v 1.19 2006/11/14 18:00:27 jmc Exp $ */
+/* $OpenBSD: kern_acct.c,v 1.20 2007/01/16 17:52:18 thib Exp $ */
/* $NetBSD: kern_acct.c,v 1.42 1996/02/04 02:15:12 christos Exp $ */
/*-
@@ -227,7 +227,6 @@ acct_process(struct proc *p)
/*
* Now, just write the accounting information to the file.
*/
- VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
error = vn_rdwr(UIO_WRITE, vp, (caddr_t)&acct, sizeof (acct),
(off_t)0, UIO_SYSSPACE, IO_APPEND|IO_UNIT, p->p_ucred, NULL, p);
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index f95d021c7ae..7af39621580 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_sig.c,v 1.84 2006/06/15 20:08:01 miod Exp $ */
+/* $OpenBSD: kern_sig.c,v 1.85 2007/01/16 17:52:18 thib Exp $ */
/* $NetBSD: kern_sig.c,v 1.54 1996/04/22 01:38:32 christos Exp $ */
/*
@@ -1353,7 +1353,6 @@ coredump(struct proc *p)
}
VATTR_NULL(&vattr);
vattr.va_size = 0;
- VOP_LEASE(vp, p, cred, LEASE_WRITE);
VOP_SETATTR(vp, &vattr, cred, p);
p->p_acflag |= ACORE;
bcopy(p, &p->p_addr->u_kproc.kp_proc, sizeof(struct proc));
diff --git a/sys/kern/spec_vnops.c b/sys/kern/spec_vnops.c
index 2411f00f705..9a68d9ea1fb 100644
--- a/sys/kern/spec_vnops.c
+++ b/sys/kern/spec_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spec_vnops.c,v 1.37 2006/11/29 14:30:30 krw Exp $ */
+/* $OpenBSD: spec_vnops.c,v 1.38 2007/01/16 17:52:18 thib Exp $ */
/* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */
/*
@@ -68,7 +68,6 @@ struct vnodeopv_entry_desc spec_vnodeop_entries[] = {
{ &vop_setattr_desc, spec_setattr }, /* setattr */
{ &vop_read_desc, spec_read }, /* read */
{ &vop_write_desc, spec_write }, /* write */
- { &vop_lease_desc, spec_lease_check }, /* lease */
{ &vop_ioctl_desc, spec_ioctl }, /* ioctl */
{ &vop_poll_desc, spec_poll }, /* poll */
{ &vop_kqfilter_desc, spec_kqfilter }, /* kqfilter */
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index 0cca9aeb9d3..66ac1394dca 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_usrreq.c,v 1.33 2006/11/17 08:33:20 claudio Exp $ */
+/* $OpenBSD: uipc_usrreq.c,v 1.34 2007/01/16 17:52:18 thib Exp $ */
/* $NetBSD: uipc_usrreq.c,v 1.18 1996/02/09 19:00:50 christos Exp $ */
/*
@@ -426,7 +426,6 @@ unp_bind(struct unpcb *unp, struct mbuf *nam, struct proc *p)
VATTR_NULL(&vattr);
vattr.va_type = VSOCK;
vattr.va_mode = ACCESSPERMS &~ p->p_fd->fd_cmask;
- VOP_LEASE(nd.ni_dvp, p, p->p_ucred, LEASE_WRITE);
error = VOP_CREATE(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr);
if (error)
return (error);
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c
index d4a6e35919c..da7b13db6a9 100644
--- a/sys/kern/vfs_default.c
+++ b/sys/kern/vfs_default.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_default.c,v 1.30 2005/11/07 01:02:32 pedro Exp $ */
+/* $OpenBSD: vfs_default.c,v 1.31 2007/01/16 17:52:18 thib Exp $ */
/*
* Portions of this code are:
@@ -235,11 +235,3 @@ filt_generic_readwrite(struct knote *kn, long hint)
return (1);
}
-
-int lease_check(void *);
-
-int
-lease_check(void *v)
-{
- return (0);
-}
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 6e734e3cdd9..7c309acf9b4 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_syscalls.c,v 1.138 2006/11/24 17:04:20 art Exp $ */
+/* $OpenBSD: vfs_syscalls.c,v 1.139 2007/01/16 17:52:18 thib Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */
/*
@@ -889,7 +889,6 @@ sys_open(struct proc *p, void *v, register_t *retval)
fp->f_flag |= FHASLOCK;
}
if (localtrunc) {
- VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
if ((fp->f_flag & FWRITE) == 0)
error = EACCES;
else if (vp->v_mount->mnt_flag & MNT_RDONLY)
@@ -1029,9 +1028,6 @@ sys_fhopen(struct proc *p, void *v, register_t *retval)
goto bad;
}
if (flags & O_TRUNC) {
- VOP_UNLOCK(vp, 0, p); /* XXX */
- VOP_LEASE(vp, p, cred, LEASE_WRITE);
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); /* XXX */
VATTR_NULL(&va);
va.va_size = 0;
if ((error = VOP_SETATTR(vp, &va, cred, p)) != 0)
@@ -1207,7 +1203,6 @@ sys_mknod(struct proc *p, void *v, register_t *retval)
}
}
if (!error) {
- VOP_LEASE(nd.ni_dvp, p, p->p_ucred, LEASE_WRITE);
error = VOP_MKNOD(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr);
} else {
VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd);
@@ -1254,7 +1249,6 @@ sys_mkfifo(struct proc *p, void *v, register_t *retval)
VATTR_NULL(&vattr);
vattr.va_type = VFIFO;
vattr.va_mode = (SCARG(uap, mode) & ALLPERMS) &~ p->p_fd->fd_cmask;
- VOP_LEASE(nd.ni_dvp, p, p->p_ucred, LEASE_WRITE);
return (VOP_MKNOD(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr));
#endif /* FIFO */
}
@@ -1298,8 +1292,6 @@ sys_link(struct proc *p, void *v, register_t *retval)
error = EEXIST;
goto out;
}
- VOP_LEASE(nd.ni_dvp, p, p->p_ucred, LEASE_WRITE);
- VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
error = VOP_LINK(nd.ni_dvp, vp, &nd.ni_cnd);
out:
vrele(vp);
@@ -1341,7 +1333,6 @@ sys_symlink(struct proc *p, void *v, register_t *retval)
}
VATTR_NULL(&vattr);
vattr.va_mode = ACCESSPERMS &~ p->p_fd->fd_cmask;
- VOP_LEASE(nd.ni_dvp, p, p->p_ucred, LEASE_WRITE);
error = VOP_SYMLINK(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr, path);
out:
pool_put(&namei_pool, path);
@@ -1384,8 +1375,6 @@ sys_unlink(struct proc *p, void *v, register_t *retval)
(void)uvm_vnp_uncache(vp);
- VOP_LEASE(nd.ni_dvp, p, p->p_ucred, LEASE_WRITE);
- VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
error = VOP_REMOVE(nd.ni_dvp, nd.ni_vp, &nd.ni_cnd);
out:
return (error);
@@ -1640,7 +1629,6 @@ sys_chflags(struct proc *p, void *v, register_t *retval)
if ((error = namei(&nd)) != 0)
return (error);
vp = nd.ni_vp;
- VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
if (vp->v_mount->mnt_flag & MNT_RDONLY)
error = EROFS;
@@ -1683,7 +1671,6 @@ sys_fchflags(struct proc *p, void *v, register_t *retval)
if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0)
return (error);
vp = (struct vnode *)fp->f_data;
- VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
if (vp->v_mount && vp->v_mount->mnt_flag & MNT_RDONLY)
error = EROFS;
@@ -1732,7 +1719,6 @@ sys_chmod(struct proc *p, void *v, register_t *retval)
if ((error = namei(&nd)) != 0)
return (error);
vp = nd.ni_vp;
- VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
if (vp->v_mount->mnt_flag & MNT_RDONLY)
error = EROFS;
@@ -1767,7 +1753,6 @@ sys_fchmod(struct proc *p, void *v, register_t *retval)
if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0)
return (error);
vp = (struct vnode *)fp->f_data;
- VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
if (vp->v_mount && vp->v_mount->mnt_flag & MNT_RDONLY)
error = EROFS;
@@ -1803,7 +1788,6 @@ sys_chown(struct proc *p, void *v, register_t *retval)
if ((error = namei(&nd)) != 0)
return (error);
vp = nd.ni_vp;
- VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
if (vp->v_mount->mnt_flag & MNT_RDONLY)
error = EROFS;
@@ -1852,7 +1836,6 @@ sys_lchown(struct proc *p, void *v, register_t *retval)
if ((error = namei(&nd)) != 0)
return (error);
vp = nd.ni_vp;
- VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
if (vp->v_mount->mnt_flag & MNT_RDONLY)
error = EROFS;
@@ -1900,7 +1883,6 @@ sys_fchown(struct proc *p, void *v, register_t *retval)
if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0)
return (error);
vp = (struct vnode *)fp->f_data;
- VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
if (vp->v_mount->mnt_flag & MNT_RDONLY)
error = EROFS;
@@ -1964,7 +1946,6 @@ sys_utimes(struct proc *p, void *v, register_t *retval)
if ((error = namei(&nd)) != 0)
return (error);
vp = nd.ni_vp;
- VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
if (vp->v_mount->mnt_flag & MNT_RDONLY)
error = EROFS;
@@ -2015,7 +1996,6 @@ sys_futimes(struct proc *p, void *v, register_t *retval)
if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0)
return (error);
vp = (struct vnode *)fp->f_data;
- VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
if (vp->v_mount && vp->v_mount->mnt_flag & MNT_RDONLY)
error = EROFS;
@@ -2052,7 +2032,6 @@ sys_truncate(struct proc *p, void *v, register_t *retval)
if ((error = namei(&nd)) != 0)
return (error);
vp = nd.ni_vp;
- VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
if (vp->v_type == VDIR)
error = EISDIR;
@@ -2092,7 +2071,6 @@ sys_ftruncate(struct proc *p, void *v, register_t *retval)
goto bad;
}
vp = (struct vnode *)fp->f_data;
- VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
if (vp->v_type == VDIR)
error = EISDIR;
@@ -2195,12 +2173,8 @@ sys_rename(struct proc *p, void *v, register_t *retval)
error = -1;
out:
if (!error) {
- VOP_LEASE(tdvp, p, p->p_ucred, LEASE_WRITE);
- if (fromnd.ni_dvp != tdvp)
- VOP_LEASE(fromnd.ni_dvp, p, p->p_ucred, LEASE_WRITE);
if (tvp) {
(void)uvm_vnp_uncache(tvp);
- VOP_LEASE(tvp, p, p->p_ucred, LEASE_WRITE);
}
error = VOP_RENAME(fromnd.ni_dvp, fromnd.ni_vp, &fromnd.ni_cnd,
tond.ni_dvp, tond.ni_vp, &tond.ni_cnd);
@@ -2260,7 +2234,6 @@ sys_mkdir(struct proc *p, void *v, register_t *retval)
VATTR_NULL(&vattr);
vattr.va_type = VDIR;
vattr.va_mode = (SCARG(uap, mode) & ACCESSPERMS) &~ p->p_fd->fd_cmask;
- VOP_LEASE(nd.ni_dvp, p, p->p_ucred, LEASE_WRITE);
error = VOP_MKDIR(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr);
if (!error)
vput(nd.ni_vp);
@@ -2304,8 +2277,6 @@ sys_rmdir(struct proc *p, void *v, register_t *retval)
error = EBUSY;
out:
if (!error) {
- VOP_LEASE(nd.ni_dvp, p, p->p_ucred, LEASE_WRITE);
- VOP_LEASE(vp, p, p->p_ucred, LEASE_WRITE);
error = VOP_RMDIR(nd.ni_dvp, nd.ni_vp, &nd.ni_cnd);
} else {
VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd);
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index d154d6b87b1..02e5b818a8c 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_vnops.c,v 1.53 2006/06/02 20:25:09 pedro Exp $ */
+/* $OpenBSD: vfs_vnops.c,v 1.54 2007/01/16 17:52:18 thib Exp $ */
/* $NetBSD: vfs_vnops.c,v 1.20 1996/02/04 02:18:41 christos Exp $ */
/*
@@ -96,7 +96,6 @@ vn_open(struct nameidata *ndp, int fmode, int cmode)
VATTR_NULL(&va);
va.va_type = VREG;
va.va_mode = cmode;
- VOP_LEASE(ndp->ni_dvp, p, cred, LEASE_WRITE);
error = VOP_CREATE(ndp->ni_dvp, &ndp->ni_vp,
&ndp->ni_cnd, &va);
if (error)
@@ -149,9 +148,6 @@ vn_open(struct nameidata *ndp, int fmode, int cmode)
}
}
if ((fmode & O_TRUNC) && vp->v_type == VREG) {
- VOP_UNLOCK(vp, 0, p); /* XXX */
- VOP_LEASE(vp, p, cred, LEASE_WRITE);
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); /* XXX */
VATTR_NULL(&va);
va.va_size = 0;
if ((error = VOP_SETATTR(vp, &va, cred, p)) != 0)
@@ -292,7 +288,6 @@ vn_read(struct file *fp, off_t *poff, struct uio *uio, struct ucred *cred)
size_t count;
struct proc *p = uio->uio_procp;
- VOP_LEASE(vp, uio->uio_procp, cred, LEASE_READ);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
uio->uio_offset = *poff;
count = uio->uio_resid;
@@ -322,7 +317,6 @@ vn_write(struct file *fp, off_t *poff, struct uio *uio, struct ucred *cred)
if ((fp->f_flag & FFSYNC) ||
(vp->v_mount && (vp->v_mount->mnt_flag & MNT_SYNCHRONOUS)))
ioflag |= IO_SYNC;
- VOP_LEASE(vp, uio->uio_procp, cred, LEASE_WRITE);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
uio->uio_offset = *poff;
count = uio->uio_resid;
diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src
index bc7422c1b37..b15a3fd991f 100644
--- a/sys/kern/vnode_if.src
+++ b/sys/kern/vnode_if.src
@@ -1,4 +1,4 @@
-# $OpenBSD: vnode_if.src,v 1.31 2006/10/16 11:27:53 pedro Exp $
+# $OpenBSD: vnode_if.src,v 1.32 2007/01/16 17:52:18 thib Exp $
# $NetBSD: vnode_if.src,v 1.10 1996/05/11 18:26:27 mycroft Exp $
#
# Copyright (c) 1992, 1993
@@ -187,16 +187,6 @@ vop_write {
};
#
-#% lease vp = = =
-#
-vop_lease {
- IN struct vnode *vp;
- IN struct proc *p;
- IN struct ucred *cred;
- IN int flag;
-};
-
-#
#% ioctl vp U U U
#
diff --git a/sys/miscfs/fifofs/fifo.h b/sys/miscfs/fifofs/fifo.h
index cdd59999b76..b3b0754285d 100644
--- a/sys/miscfs/fifofs/fifo.h
+++ b/sys/miscfs/fifofs/fifo.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: fifo.h,v 1.15 2004/03/02 04:42:52 tedu Exp $ */
+/* $OpenBSD: fifo.h,v 1.16 2007/01/16 17:52:18 thib Exp $ */
/* $NetBSD: fifo.h,v 1.10 1996/02/09 22:40:15 christos Exp $ */
/*
@@ -49,7 +49,6 @@ int fifo_close(void *);
#define fifo_setattr fifo_ebadf
int fifo_read(void *);
int fifo_write(void *);
-#define fifo_lease_check nullop
int fifo_ioctl(void *);
int fifo_poll(void *);
int fifo_kqfilter(void *);
diff --git a/sys/miscfs/fifofs/fifo_vnops.c b/sys/miscfs/fifofs/fifo_vnops.c
index 2d6343c1095..6ba6fd0c11d 100644
--- a/sys/miscfs/fifofs/fifo_vnops.c
+++ b/sys/miscfs/fifofs/fifo_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fifo_vnops.c,v 1.21 2004/05/18 12:37:51 pedro Exp $ */
+/* $OpenBSD: fifo_vnops.c,v 1.22 2007/01/16 17:52:18 thib Exp $ */
/* $NetBSD: fifo_vnops.c,v 1.18 1996/03/16 23:52:42 christos Exp $ */
/*
@@ -74,7 +74,6 @@ struct vnodeopv_entry_desc fifo_vnodeop_entries[] = {
{ &vop_setattr_desc, fifo_setattr }, /* setattr */
{ &vop_read_desc, fifo_read }, /* read */
{ &vop_write_desc, fifo_write }, /* write */
- { &vop_lease_desc, fifo_lease_check }, /* lease */
{ &vop_ioctl_desc, fifo_ioctl }, /* ioctl */
{ &vop_poll_desc, fifo_poll }, /* poll */
{ &vop_kqfilter_desc, fifo_kqfilter }, /* kqfilter */
diff --git a/sys/miscfs/specfs/spec_vnops.c b/sys/miscfs/specfs/spec_vnops.c
index 2411f00f705..9a68d9ea1fb 100644
--- a/sys/miscfs/specfs/spec_vnops.c
+++ b/sys/miscfs/specfs/spec_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spec_vnops.c,v 1.37 2006/11/29 14:30:30 krw Exp $ */
+/* $OpenBSD: spec_vnops.c,v 1.38 2007/01/16 17:52:18 thib Exp $ */
/* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */
/*
@@ -68,7 +68,6 @@ struct vnodeopv_entry_desc spec_vnodeop_entries[] = {
{ &vop_setattr_desc, spec_setattr }, /* setattr */
{ &vop_read_desc, spec_read }, /* read */
{ &vop_write_desc, spec_write }, /* write */
- { &vop_lease_desc, spec_lease_check }, /* lease */
{ &vop_ioctl_desc, spec_ioctl }, /* ioctl */
{ &vop_poll_desc, spec_poll }, /* poll */
{ &vop_kqfilter_desc, spec_kqfilter }, /* kqfilter */
diff --git a/sys/miscfs/specfs/specdev.h b/sys/miscfs/specfs/specdev.h
index 8fc18c628b5..c95b18393d4 100644
--- a/sys/miscfs/specfs/specdev.h
+++ b/sys/miscfs/specfs/specdev.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: specdev.h,v 1.18 2006/06/02 20:25:09 pedro Exp $ */
+/* $OpenBSD: specdev.h,v 1.19 2007/01/16 17:52:18 thib Exp $ */
/* $NetBSD: specdev.h,v 1.12 1996/02/13 13:13:01 mycroft Exp $ */
/*
@@ -102,7 +102,6 @@ int spec_close(void *);
#define spec_setattr spec_ebadf
int spec_read(void *);
int spec_write(void *);
-#define spec_lease_check nullop
int spec_ioctl(void *);
int spec_poll(void *);
int spec_kqfilter(void *);
diff --git a/sys/msdosfs/denode.h b/sys/msdosfs/denode.h
index 827433ac702..dd8d992ce57 100644
--- a/sys/msdosfs/denode.h
+++ b/sys/msdosfs/denode.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: denode.h,v 1.18 2005/03/01 14:24:33 tom Exp $ */
+/* $OpenBSD: denode.h,v 1.19 2007/01/16 17:52:18 thib Exp $ */
/* $NetBSD: denode.h,v 1.24 1997/10/17 11:23:39 ws Exp $ */
/*-
@@ -268,12 +268,6 @@ int msdosfs_getattr(void *);
int msdosfs_setattr(void *);
int msdosfs_read(void *);
int msdosfs_write(void *);
-#ifdef NFSSERVER
-int lease_check(void *);
-#define msdosfs_lease_check lease_check
-#else
-#define msdosfs_lease_check nullop
-#endif
int msdosfs_ioctl(void *);
int msdosfs_poll(void *);
int msdosfs_fsync(void *);
diff --git a/sys/msdosfs/msdosfs_vnops.c b/sys/msdosfs/msdosfs_vnops.c
index 14c457320d9..3930d00277e 100644
--- a/sys/msdosfs/msdosfs_vnops.c
+++ b/sys/msdosfs/msdosfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: msdosfs_vnops.c,v 1.58 2006/10/16 11:27:53 pedro Exp $ */
+/* $OpenBSD: msdosfs_vnops.c,v 1.59 2007/01/16 17:52:18 thib Exp $ */
/* $NetBSD: msdosfs_vnops.c,v 1.63 1997/10/17 11:24:19 ws Exp $ */
/*-
@@ -1977,7 +1977,6 @@ struct vnodeopv_entry_desc msdosfs_vnodeop_entries[] = {
{ &vop_setattr_desc, msdosfs_setattr }, /* setattr */
{ &vop_read_desc, msdosfs_read }, /* read */
{ &vop_write_desc, msdosfs_write }, /* write */
- { &vop_lease_desc, msdosfs_lease_check }, /* lease */
{ &vop_ioctl_desc, msdosfs_ioctl }, /* ioctl */
{ &vop_poll_desc, msdosfs_poll }, /* poll */
{ &vop_fsync_desc, msdosfs_fsync }, /* fsync */
diff --git a/sys/nfs/nfs.h b/sys/nfs/nfs.h
index e5b8ed9de94..e8afe957dda 100644
--- a/sys/nfs/nfs.h
+++ b/sys/nfs/nfs.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs.h,v 1.27 2006/09/20 21:56:21 thib Exp $ */
+/* $OpenBSD: nfs.h,v 1.28 2007/01/16 17:52:18 thib Exp $ */
/* $NetBSD: nfs.h,v 1.10.4.1 1996/05/27 11:23:56 fvdl Exp $ */
/*
@@ -427,10 +427,6 @@ struct nfsrv_descript {
};
/* Bits for "nd_flag" */
-#define ND_READ LEASE_READ
-#define ND_WRITE LEASE_WRITE
-#define ND_CHECK 0x04
-#define ND_LEASE (ND_READ | ND_WRITE | ND_CHECK)
#define ND_NFSV3 0x08
#define ND_KERBNICK 0x20
#define ND_KERBFULL 0x40
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c
index b85f0821420..d71bdbfe455 100644
--- a/sys/nfs/nfs_vnops.c
+++ b/sys/nfs/nfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_vnops.c,v 1.69 2006/12/29 13:04:37 pedro Exp $ */
+/* $OpenBSD: nfs_vnops.c,v 1.70 2007/01/16 17:52:18 thib Exp $ */
/* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */
/*
@@ -98,7 +98,6 @@ struct vnodeopv_entry_desc nfsv2_vnodeop_entries[] = {
{ &vop_setattr_desc, nfs_setattr }, /* setattr */
{ &vop_read_desc, nfs_read }, /* read */
{ &vop_write_desc, nfs_write }, /* write */
- { &vop_lease_desc, nfs_lease_check }, /* lease */
{ &vop_ioctl_desc, nfs_ioctl }, /* ioctl */
{ &vop_poll_desc, nfs_poll }, /* poll */
{ &vop_kqfilter_desc, nfs_kqfilter }, /* kqfilter */
diff --git a/sys/nfs/nfsnode.h b/sys/nfs/nfsnode.h
index ef09b6ff6a1..708218c9518 100644
--- a/sys/nfs/nfsnode.h
+++ b/sys/nfs/nfsnode.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfsnode.h,v 1.22 2004/08/03 17:11:48 marius Exp $ */
+/* $OpenBSD: nfsnode.h,v 1.23 2007/01/16 17:52:18 thib Exp $ */
/* $NetBSD: nfsnode.h,v 1.16 1996/02/18 11:54:04 fvdl Exp $ */
/*
@@ -178,8 +178,6 @@ int nfs_getattr(void *);
int nfs_setattr(void *);
int nfs_read(void *);
int nfs_write(void *);
-#define nfs_lease_check ((int (*)(void *))nullop)
-#define nqnfs_vop_lease_check lease_check
int nfsspec_read(void *);
int nfsspec_write(void *);
int nfsfifo_read(void *);
diff --git a/sys/sys/specdev.h b/sys/sys/specdev.h
index 8fc18c628b5..c95b18393d4 100644
--- a/sys/sys/specdev.h
+++ b/sys/sys/specdev.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: specdev.h,v 1.18 2006/06/02 20:25:09 pedro Exp $ */
+/* $OpenBSD: specdev.h,v 1.19 2007/01/16 17:52:18 thib Exp $ */
/* $NetBSD: specdev.h,v 1.12 1996/02/13 13:13:01 mycroft Exp $ */
/*
@@ -102,7 +102,6 @@ int spec_close(void *);
#define spec_setattr spec_ebadf
int spec_read(void *);
int spec_write(void *);
-#define spec_lease_check nullop
int spec_ioctl(void *);
int spec_poll(void *);
int spec_kqfilter(void *);
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 19b61ae5ce9..099fa665797 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnode.h,v 1.72 2006/11/20 12:52:54 tom Exp $ */
+/* $OpenBSD: vnode.h,v 1.73 2007/01/16 17:52:18 thib Exp $ */
/* $NetBSD: vnode.h,v 1.38 1996/02/29 20:59:05 cgd Exp $ */
/*
@@ -271,12 +271,6 @@ extern time_t syncdelay; /* time to delay syncing vnodes */
extern int rushjob; /* # of slots syncer should run ASAP */
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 */
-
#endif /* _KERNEL */
diff --git a/sys/ufs/ext2fs/ext2fs_vnops.c b/sys/ufs/ext2fs/ext2fs_vnops.c
index a5fb2cdb455..6c3ba4e44a5 100644
--- a/sys/ufs/ext2fs/ext2fs_vnops.c
+++ b/sys/ufs/ext2fs/ext2fs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ext2fs_vnops.c,v 1.44 2006/01/09 12:43:17 pedro Exp $ */
+/* $OpenBSD: ext2fs_vnops.c,v 1.45 2007/01/16 17:52:18 thib Exp $ */
/* $NetBSD: ext2fs_vnops.c,v 1.1 1997/06/11 09:34:09 bouyer Exp $ */
/*
@@ -1371,7 +1371,6 @@ struct vnodeopv_entry_desc ext2fs_vnodeop_entries[] = {
{ &vop_setattr_desc, ext2fs_setattr }, /* setattr */
{ &vop_read_desc, ext2fs_read }, /* read */
{ &vop_write_desc, ext2fs_write }, /* write */
- { &vop_lease_desc, ufs_lease_check }, /* lease */
{ &vop_ioctl_desc, ufs_ioctl }, /* ioctl */
{ &vop_poll_desc, ufs_poll }, /* poll */
{ &vop_kqfilter_desc, vop_generic_kqfilter }, /* kqfilter */
diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c
index 6d9035e88fa..c0c8f9ecd42 100644
--- a/sys/ufs/ffs/ffs_vnops.c
+++ b/sys/ufs/ffs/ffs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ffs_vnops.c,v 1.40 2007/01/13 17:41:55 thib Exp $ */
+/* $OpenBSD: ffs_vnops.c,v 1.41 2007/01/16 17:52:18 thib Exp $ */
/* $NetBSD: ffs_vnops.c,v 1.7 1996/05/11 18:27:24 mycroft Exp $ */
/*
@@ -76,7 +76,6 @@ struct vnodeopv_entry_desc ffs_vnodeop_entries[] = {
{ &vop_setattr_desc, ufs_setattr }, /* setattr */
{ &vop_read_desc, ffs_read }, /* read */
{ &vop_write_desc, ffs_write }, /* write */
- { &vop_lease_desc, ufs_lease_check }, /* lease */
{ &vop_ioctl_desc, ufs_ioctl }, /* ioctl */
{ &vop_poll_desc, ufs_poll }, /* poll */
{ &vop_kqfilter_desc, ufs_kqfilter }, /* kqfilter */
diff --git a/sys/ufs/ufs/ufs_extern.h b/sys/ufs/ufs/ufs_extern.h
index 997b9e978fc..6ffb6f788a5 100644
--- a/sys/ufs/ufs/ufs_extern.h
+++ b/sys/ufs/ufs/ufs_extern.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ufs_extern.h,v 1.26 2006/10/03 19:49:06 pedro Exp $ */
+/* $OpenBSD: ufs_extern.h,v 1.27 2007/01/16 17:52:18 thib Exp $ */
/* $NetBSD: ufs_extern.h,v 1.5 1996/02/09 22:36:03 christos Exp $ */
/*-
@@ -63,12 +63,6 @@ int ufs_getattr(void *);
int ufs_inactive(void *);
int ufs_ioctl(void *);
int ufs_islocked(void *);
-#ifdef NFSSERVER
-int lease_check(void *);
-#define ufs_lease_check lease_check
-#else
-#define ufs_lease_check ((int (*)(void *))nullop)
-#endif
int ufs_link(void *);
int ufs_lock(void *);
int ufs_lookup(void *);
diff --git a/sys/xfs/xfs_vopdefs.h b/sys/xfs/xfs_vopdefs.h
index f6be67591cb..0082f332faf 100644
--- a/sys/xfs/xfs_vopdefs.h
+++ b/sys/xfs/xfs_vopdefs.h
@@ -20,8 +20,6 @@ NNPFS_VOP_DEF(setattr);
NNPFS_VOP_DEF(read);
#define HAVE_VOP_WRITE 1
NNPFS_VOP_DEF(write);
-#define HAVE_VOP_LEASE 1
-NNPFS_VOP_DEF(lease);
#define HAVE_VOP_IOCTL 1
NNPFS_VOP_DEF(ioctl);
#define HAVE_VOP_POLL 1