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. */
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to