diff options
author | tegge <tegge@FreeBSD.org> | 2000-11-02 21:42:54 +0000 |
---|---|---|
committer | tegge <tegge@FreeBSD.org> | 2000-11-02 21:42:54 +0000 |
commit | 8e9f33e1ce2a8ec7d527ae256a6424a60e6e1c3b (patch) | |
tree | d563ae4c28add0c76987780fc6e593ecca29df18 /sys | |
parent | 5262a5cdb7dfd2f2a2e8cfc15c1404a17a0caa89 (diff) | |
download | FreeBSD-src-8e9f33e1ce2a8ec7d527ae256a6424a60e6e1c3b.zip FreeBSD-src-8e9f33e1ce2a8ec7d527ae256a6424a60e6e1c3b.tar.gz |
Clear the VFREE flag when the vnode is removed from the free list in
getnewvnode(). Otherwise routines called from VOP_INACTIVE() might
attempt to remove the vnode from a free list the vnode isn't on,
causing corruption.
PR: 18012
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_export.c | 1 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index afb43d7..fd81bc8 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -582,6 +582,7 @@ getnewvnode(tag, mp, vops, vpp) } if (vp) { vp->v_flag |= VDOOMED; + vp->v_flag &= ~VFREE; freevnodes--; simple_unlock(&vnode_free_list_slock); cache_purge(vp); diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index afb43d7..fd81bc8 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -582,6 +582,7 @@ getnewvnode(tag, mp, vops, vpp) } if (vp) { vp->v_flag |= VDOOMED; + vp->v_flag &= ~VFREE; freevnodes--; simple_unlock(&vnode_free_list_slock); cache_purge(vp); |