svn commit: r222184 - head/sys/vm

Alan Cox alc at FreeBSD.org
Sun May 22 17:46:16 UTC 2011


Author: alc
Date: Sun May 22 17:46:16 2011
New Revision: 222184
URL: http://svn.freebsd.org/changeset/base/222184

Log:
  Correct an error in r222163.  Unless UMA_MD_SMALL_ALLOC is defined,
  startup_alloc() must be used until uma_startup2() is called.
  
  Reported by:	jh

Modified:
  head/sys/vm/uma_core.c

Modified: head/sys/vm/uma_core.c
==============================================================================
--- head/sys/vm/uma_core.c	Sun May 22 16:32:44 2011	(r222183)
+++ head/sys/vm/uma_core.c	Sun May 22 17:46:16 2011	(r222184)
@@ -1318,9 +1318,13 @@ keg_ctor(void *mem, int size, void *udat
 #ifdef UMA_MD_SMALL_ALLOC
 		keg->uk_allocf = uma_small_alloc;
 		keg->uk_freef = uma_small_free;
-#endif
+
 		if (booted < UMA_STARTUP)
 			keg->uk_allocf = startup_alloc;
+#else
+		if (booted < UMA_STARTUP2)
+			keg->uk_allocf = startup_alloc;
+#endif
 	} else if (booted < UMA_STARTUP2 &&
 	    (keg->uk_flags & UMA_ZFLAG_INTERNAL))
 		keg->uk_allocf = startup_alloc;


More information about the svn-src-all mailing list