svn commit: r263359 - stable/10/sys/vm
Konstantin Belousov
kib at FreeBSD.org
Wed Mar 19 13:04:17 UTC 2014
Author: kib
Date: Wed Mar 19 13:04:16 2014
New Revision: 263359
URL: http://svnweb.freebsd.org/changeset/base/263359
Log:
MFC r263092:
Do not vdrop() the tmpfs vnode until it is unlocked. The hold
reference might be the last, and then vdrop() would free the vnode.
Modified:
stable/10/sys/vm/vm_object.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/vm/vm_object.c
==============================================================================
--- stable/10/sys/vm/vm_object.c Wed Mar 19 13:02:26 2014 (r263358)
+++ stable/10/sys/vm/vm_object.c Wed Mar 19 13:04:16 2014 (r263359)
@@ -536,17 +536,18 @@ vm_object_deallocate(vm_object_t object)
vhold(vp);
VM_OBJECT_WUNLOCK(object);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
- vdrop(vp);
VM_OBJECT_WLOCK(object);
if (object->type == OBJT_DEAD ||
object->ref_count != 1) {
VM_OBJECT_WUNLOCK(object);
VOP_UNLOCK(vp, 0);
+ vdrop(vp);
return;
}
if ((object->flags & OBJ_TMPFS) != 0)
VOP_UNSET_TEXT(vp);
VOP_UNLOCK(vp, 0);
+ vdrop(vp);
}
if (object->shadow_count == 0 &&
object->handle == NULL &&
More information about the svn-src-stable
mailing list