cache: don't ignore size passed to nchinittbl

This commit is contained in:
Mateusz Guzik 2020-08-05 09:38:02 +00:00
parent c36edafbd4
commit e1b1971c05
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=363895

View File

@ -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++)