cache: move shrink lock init to nchinit

This gets rid of unnecesary sysinit usage.

While here also rename the lock to be consistent with the rest.
This commit is contained in:
Mateusz Guzik 2016-12-29 12:01:54 +00:00
parent 1e2b4cef91
commit b37707533e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=310774

View File

@ -229,8 +229,6 @@ SYSCTL_UINT(_vfs, OID_AUTO, ncneghitsrequeue, CTLFLAG_RW, &ncneghitsrequeue, 0,
struct nchstats nchstats; /* cache effectiveness statistics */
static struct mtx ncneg_shrink_lock;
MTX_SYSINIT(vfscache_shrink_neg, &ncneg_shrink_lock, "Name Cache shrink neg",
MTX_DEF);
struct neglist {
struct mtx nl_lock;
@ -1802,6 +1800,8 @@ nchinit(void *dummy __unused)
mtx_init(&ncneg_hot.nl_lock, "ncneglh", NULL, MTX_DEF);
TAILQ_INIT(&ncneg_hot.nl_list);
mtx_init(&ncneg_shrink_lock, "ncnegs", NULL, MTX_DEF);
numcalls = counter_u64_alloc(M_WAITOK);
dothits = counter_u64_alloc(M_WAITOK);
dotdothits = counter_u64_alloc(M_WAITOK);