- We must hold a reference to a vnode before calling vgone() otherwise

it may not be removed from the freelist.

MFC After:	1 week
Found by:	kris
This commit is contained in:
Jeff Roberson 2006-02-22 09:05:40 +00:00
parent a4aeaefe5a
commit f50b03bfd6

View File

@ -239,8 +239,10 @@ devfs_delete(struct devfs_mount *dm, struct devfs_dirent *de)
de->de_symlink = NULL;
}
if (de->de_vnode != NULL) {
vhold(de->de_vnode);
de->de_vnode->v_data = NULL;
vgone(de->de_vnode);
vdrop(de->de_vnode);
de->de_vnode = NULL;
}
#ifdef MAC