summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2007-05-05 12:03:05 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2007-05-05 12:03:05 +0000
commitb5b2d558aea0851d214d1a05e1fdb6d96ce526cb (patch)
treefa332d9b0e7224c2a5316a3826ed535e95e9594f
parent9ea86fa2c01c7402f75507372cb2d5f1028bab05 (diff)
vn_access hasn't been used for ages and it's just a wrapper with
locking around VOP_ACCESS. It can go.
-rw-r--r--sys/kern/vfs_vnops.c16
-rw-r--r--sys/sys/vnode.h3
2 files changed, 2 insertions, 17 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index cedd61b84c3..f7309c9ed72 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_vnops.c,v 1.55 2007/03/21 17:29:32 thib Exp $ */
+/* $OpenBSD: vfs_vnops.c,v 1.56 2007/05/05 12:03:04 art Exp $ */
/* $NetBSD: vfs_vnops.c,v 1.20 1996/02/04 02:18:41 christos Exp $ */
/*
@@ -497,20 +497,6 @@ vn_kqfilter(struct file *fp, struct knote *kn)
/*
* Common code for vnode access operations.
*/
-int
-vn_access(struct vnode *vp, int mode)
-{
- struct proc *p = curproc;
- int error;
-
- if ((error = vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p)))
- return (error);
-
- error = VOP_ACCESS(vp, mode, p->p_ucred, p);
- VOP_UNLOCK(vp, 0, p);
-
- return (error);
-}
/* Check if a directory can be found inside another in the hierarchy */
int
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 8e27e9b60b0..ff9acf4218c 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vnode.h,v 1.78 2007/04/14 23:17:00 bluhm Exp $ */
+/* $OpenBSD: vnode.h,v 1.79 2007/05/05 12:03:04 art Exp $ */
/* $NetBSD: vnode.h,v 1.38 1996/02/29 20:59:05 cgd Exp $ */
/*
@@ -453,7 +453,6 @@ int vop_generic_revoke(void *);
int vop_generic_kqfilter(void *);
/* vfs_vnops.c */
-int vn_access(struct vnode *, int);
int vn_isunder(struct vnode *, struct vnode *, struct proc *);
int vn_close(struct vnode *, int, struct ucred *, struct proc *);
int vn_open(struct nameidata *, int, int);