diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2002-08-11 22:32:32 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2002-08-11 22:32:32 +0000 |
commit | bbd5a4a5fd801f5262250bf5798f6897f255c43f (patch) | |
tree | 4c11a801b2ff9d7b57792189b95ce7cded13edf2 /sys/kern/vfs_subr.c | |
parent | da14b392e8e586b4676863b9058147aea49bc9f7 (diff) |
Add two missing vfs_busy calls in the failure path of sysctl_vnode.
Found by aaron@
NOTE - I think we need a mount-point iterator just like we have
NOTE - vfs_mount_foreach_vnode. (btw. why don't we use foreach_vnode in here?)
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 3f70cc8ad1d..88978dd0c2e 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_subr.c,v 1.87 2002/07/12 14:02:22 art Exp $ */ +/* $OpenBSD: vfs_subr.c,v 1.88 2002/08/11 22:32:31 art Exp $ */ /* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */ /* @@ -1469,6 +1469,7 @@ again: if (bp + sizeof(struct e_vnode) > ewhere) { simple_unlock(&mntvnode_slock); *sizep = bp - where; + vfs_unbusy(mp, p); return (ENOMEM); } if ((error = copyout((caddr_t)&vp, @@ -1476,8 +1477,10 @@ again: sizeof(struct vnode *))) || (error = copyout((caddr_t)vp, &((struct e_vnode *)bp)->vnode, - sizeof(struct vnode)))) + sizeof(struct vnode)))) { + vfs_unbusy(mp, p); return (error); + } bp += sizeof(struct e_vnode); simple_lock(&mntvnode_slock); } |