svn commit: r347150 - head/sys/vm

Konstantin Belousov kib at FreeBSD.org
Sun May 5 11:06:21 UTC 2019


Author: kib
Date: Sun May  5 11:06:19 2019
New Revision: 347150
URL: https://svnweb.freebsd.org/changeset/base/347150

Log:
  Do not collapse objects with OBJ_NOSPLIT backing swap object.
  
  NOSPLIT swap objects are not anonymous, they are used by tmpfs regular
  files and POSIX shared memory.  For such objects, collapse is not
  permitted.
  
  Reported by:	mjg
  Reviewed by:	markj, trasz
  Tested by:	mjg, pho
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week
  Differential revision:	https://reviews.freebsd.org/D19923

Modified:
  head/sys/vm/vm_object.c

Modified: head/sys/vm/vm_object.c
==============================================================================
--- head/sys/vm/vm_object.c	Sun May  5 11:05:36 2019	(r347149)
+++ head/sys/vm/vm_object.c	Sun May  5 11:06:19 2019	(r347150)
@@ -1748,7 +1748,8 @@ vm_object_collapse(vm_object_t object)
 		VM_OBJECT_WLOCK(backing_object);
 		if (backing_object->handle != NULL ||
 		    (backing_object->type != OBJT_DEFAULT &&
-		     backing_object->type != OBJT_SWAP) ||
+		    (backing_object->type != OBJT_SWAP ||
+		    (backing_object->flags & OBJ_NOSPLIT) != 0)) ||
 		    (backing_object->flags & OBJ_DEAD) ||
 		    object->handle != NULL ||
 		    (object->type != OBJT_DEFAULT &&


More information about the svn-src-head mailing list