Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Sep 2019 13:29:42 +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-12@freebsd.org
Subject:   svn commit: r352323 - stable/12/sys/vm
Message-ID:  <201909141329.x8EDTgsV033871@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sat Sep 14 13:29:41 2019
New Revision: 352323
URL: https://svnweb.freebsd.org/changeset/base/352323

Log:
  MFC r352014:
  vm_object_deallocate(): Remove no longer needed code.

Modified:
  stable/12/sys/vm/vm_object.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/vm/vm_object.c
==============================================================================
--- stable/12/sys/vm/vm_object.c	Sat Sep 14 13:27:07 2019	(r352322)
+++ stable/12/sys/vm/vm_object.c	Sat Sep 14 13:29:41 2019	(r352323)
@@ -515,7 +515,6 @@ void
 vm_object_deallocate(vm_object_t object)
 {
 	vm_object_t temp;
-	struct vnode *vp;
 
 	while (object != NULL) {
 		VM_OBJECT_WLOCK(object);
@@ -538,25 +537,6 @@ vm_object_deallocate(vm_object_t object)
 			VM_OBJECT_WUNLOCK(object);
 			return;
 		} else if (object->ref_count == 1) {
-			if (object->type == OBJT_SWAP &&
-			    (object->flags & OBJ_TMPFS) != 0) {
-				vp = object->un_pager.swp.swp_tmpfs;
-				vhold(vp);
-				VM_OBJECT_WUNLOCK(object);
-				vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
-				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 &&
 			    (object->type == OBJT_DEFAULT ||



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