Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Dec 2014 09:22:53 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r275726 - stable/10/sys/vm
Message-ID:  <201412120922.sBC9MrB7035461@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Fri Dec 12 09:22:52 2014
New Revision: 275726
URL: https://svnweb.freebsd.org/changeset/base/275726

Log:
  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.

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	Fri Dec 12 08:00:56 2014	(r275725)
+++ stable/10/sys/vm/vm_object.c	Fri Dec 12 09:22:52 2014	(r275726)
@@ -468,7 +468,12 @@ vm_object_vndeallocate(vm_object_t objec
 	}
 #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. */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412120922.sBC9MrB7035461>