svn commit: r363895 - head/sys/kern

Mateusz Guzik mjg at FreeBSD.org
Wed Aug 5 09:38:03 UTC 2020


Author: mjg
Date: Wed Aug  5 09:38:02 2020
New Revision: 363895
URL: https://svnweb.freebsd.org/changeset/base/363895

Log:
  cache: don't ignore size passed to nchinittbl

Modified:
  head/sys/kern/vfs_cache.c

Modified: head/sys/kern/vfs_cache.c
==============================================================================
--- head/sys/kern/vfs_cache.c	Wed Aug  5 09:27:53 2020	(r363894)
+++ head/sys/kern/vfs_cache.c	Wed Aug  5 09:38:02 2020	(r363895)
@@ -2070,7 +2070,7 @@ nchinittbl(u_long elements, u_long *hashmask)
 	struct nchashhead *hashtbl;
 	u_long hashsize, i;
 
-	hashsize = cache_roundup_2(desiredvnodes * 2) / 2;
+	hashsize = cache_roundup_2(elements) / 2;
 
 	hashtbl = malloc((u_long)hashsize * sizeof(*hashtbl), M_VFSCACHE, M_WAITOK);
 	for (i = 0; i < hashsize; i++)


More information about the svn-src-head mailing list