diff options
| author | Matthew Dillon <dillon@FreeBSD.org> | 2001-10-23 01:23:41 +0000 |
|---|---|---|
| committer | Matthew Dillon <dillon@FreeBSD.org> | 2001-10-23 01:23:41 +0000 |
| commit | 4f467cb8c14e4746c56a946ae76e36e27136bc06 (patch) | |
| tree | 58b611d279afe11f5b14d7737de67eabf392c14b /sys | |
| parent | c72ccd014de73fd63ea50101bc509fbd889a7dd5 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/kern/vfs_default.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index c5d1f025e3b6..cf49ef20e9ad 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -590,8 +590,11 @@ vop_stddestroyvobject(ap) * removes the primary reference to the object, * the second time goes one further and is a * special-case to terminate the object. + * + * don't double-terminate the object */ - vm_object_terminate(obj); + if ((obj->flags & OBJ_DEAD) == 0) + vm_object_terminate(obj); } else { /* * Woe to the process that tries to page now :-). @@ -601,6 +604,14 @@ vop_stddestroyvobject(ap) return (0); } +/* + * Return the underlying VM object. This routine may be called with or + * without the vnode interlock held. If called without, the returned + * object is not guarenteed to be valid. The syncer typically gets the + * object without holding the interlock in order to quickly test whether + * it might be dirty before going heavy-weight. vm_object's use zalloc + * and thus stable-storage, so this is safe. + */ int vop_stdgetvobject(ap) struct vop_getvobject_args /* { |
