summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2014-12-12 09:22:52 +0000
committerkib <kib@FreeBSD.org>2014-12-12 09:22:52 +0000
commit8b3b3c8447148612e541ae4184534ac77184e978 (patch)
treec5a15aef44d83373673a0bcec372e9a492006337 /sys/vm
parent722ac120b496ab6abe5ab580138f143f12092785 (diff)
downloadFreeBSD-src-8b3b3c8447148612e541ae4184534ac77184e978.zip
FreeBSD-src-8b3b3c8447148612e541ae4184534ac77184e978.tar.gz
MFC r275513:
When the last reference on the vnode' vm object is dropped, read the vp->v_vflag without taking vnode lock and without bypass.
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_object.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c
index 94c3d30..40fcad6 100644
--- a/sys/vm/vm_object.c
+++ b/sys/vm/vm_object.c
@@ -468,7 +468,12 @@ vm_object_vndeallocate(vm_object_t object)
}
#endif
- if (object->ref_count > 1) {
+ /*
+ * The test for text of vp vnode does not need a bypass to
+ * reach right VV_TEXT there, since it is obtained from
+ * object->handle.
+ */
+ if (object->ref_count > 1 || (vp->v_vflag & VV_TEXT) == 0) {
object->ref_count--;
VM_OBJECT_WUNLOCK(object);
/* vrele may need the vnode lock. */
OpenPOWER on IntegriCloud