diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2003-01-31 17:37:51 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2003-01-31 17:37:51 +0000 |
commit | 1b0b18abe62afb1a61733a6f5891a98bfbea81ec (patch) | |
tree | 29dc896fd65580ea85012ef60aaf813858629e3f /sys/xfs | |
parent | 2bccdd51809becfe909c271f5fef4d380c663209 (diff) |
File system locking fixups, mostly from NetBSD:
- cache_lookup
move common code from various fs's here
always return with vnode and parent locked
adjust return codes
- PDIRUNLOCK - new flag set if lookup couldn't lock parent vnode
- kernfs and procfs
lock vnode in get_root
don't unlock (again) in kernfs_freevp
fix memory leak in procfs
From tedu@stanford.edu
deraadt@ and various other ok
Diffstat (limited to 'sys/xfs')
-rw-r--r-- | sys/xfs/xfs_node-bsd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/xfs/xfs_node-bsd.c b/sys/xfs/xfs_node-bsd.c index 5e0d883a49d..afcbb8bdeda 100644 --- a/sys/xfs/xfs_node-bsd.c +++ b/sys/xfs/xfs_node-bsd.c @@ -37,7 +37,7 @@ #include <xfs/xfs_deb.h> #include <xfs/xfs_vnodeops.h> -RCSID("$Id: xfs_node-bsd.c,v 1.4 2002/06/07 04:10:32 hin Exp $"); +RCSID("$Id: xfs_node-bsd.c,v 1.5 2003/01/31 17:37:50 art Exp $"); extern vop_t **xfs_vnodeop_p; @@ -533,9 +533,9 @@ xfs_dnlc_enter(struct vnode *dvp, * The real change is sys/kern/vfs_cache:1.20 */ -#if __NetBSD_Version__ >= 104120000 +#if __NetBSD_Version__ >= 104120000 || defined(__OpenBSD__) if (cache_lookup(dvp, &dummy, cnp) != -1) { - VOP_UNLOCK(dummy, 0); + VOP_UNLOCK(dummy, 0, cnp->cn_proc); printf ("XFS PANIC WARNING! xfs_dnlc_enter: %s already in cache\n", cnp->cn_nameptr); } @@ -700,7 +700,7 @@ xfs_dnlc_lock(struct vnode *dvp, * (see the comment above for version information). */ -#if __NetBSD_Version__ >= 104120000 +#if __NetBSD_Version__ >= 104120000 || defined(__OpenBSD__) int xfs_dnlc_lookup(struct vnode *dvp, |