diff options
author | Jared Yanovich <jaredy@cvs.openbsd.org> | 2005-07-03 01:07:45 +0000 |
---|---|---|
committer | Jared Yanovich <jaredy@cvs.openbsd.org> | 2005-07-03 01:07:45 +0000 |
commit | 5350d14fa2d33a77fcb59d915df984bd3141c994 (patch) | |
tree | 03274fd9700dfcbe820e5720418ac6fd66556432 /sys/kern | |
parent | df11f3c689a5262a025731f4073f8dbe4aaba739 (diff) |
change VOP_PATHCONF to take a locked vnode, as its
comment entry describes. requires that sys_fpathconf()
lock its vnode.
lots of testing by jolan and myself, ok pedro
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_descrip.c | 4 | ||||
-rw-r--r-- | sys/kern/vnode_if.src | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c index c167becec69..a3438117ceb 100644 --- a/sys/kern/kern_descrip.c +++ b/sys/kern/kern_descrip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_descrip.c,v 1.69 2004/07/22 06:13:08 tedu Exp $ */ +/* $OpenBSD: kern_descrip.c,v 1.70 2005/07/03 01:07:44 jaredy Exp $ */ /* $NetBSD: kern_descrip.c,v 1.42 1996/03/30 22:24:38 christos Exp $ */ /* @@ -680,7 +680,9 @@ sys_fpathconf(p, v, retval) case DTYPE_VNODE: vp = (struct vnode *)fp->f_data; + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p); error = VOP_PATHCONF(vp, SCARG(uap, name), retval); + VOP_UNLOCK(vp, 0, p); break; default: diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src index 0088431559f..1b77410ebad 100644 --- a/sys/kern/vnode_if.src +++ b/sys/kern/vnode_if.src @@ -1,4 +1,4 @@ -# $OpenBSD: vnode_if.src,v 1.26 2005/05/28 03:05:44 pedro Exp $ +# $OpenBSD: vnode_if.src,v 1.27 2005/07/03 01:07:44 jaredy Exp $ # $NetBSD: vnode_if.src,v 1.10 1996/05/11 18:26:27 mycroft Exp $ # # Copyright (c) 1992, 1993 @@ -419,7 +419,7 @@ vop_print { #% pathconf vp L L L # vop_pathconf { - IN struct vnode *vp; + IN SHOULDBELOCKED struct vnode *vp; IN int name; OUT register_t *retval; }; |