MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mount_init

Function mount_init

freebsd/kern/vfs_mount.c:121–135  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119};
120
121static int
122mount_init(void *mem, int size, int flags)
123{
124 struct mount *mp;
125
126 mp = (struct mount *)mem;
127 mtx_init(&mp->mnt_mtx, "struct mount mtx", NULL, MTX_DEF);
128 mtx_init(&mp->mnt_listmtx, "struct mount vlist mtx", NULL, MTX_DEF);
129 lockinit(&mp->mnt_explock, PVFS, "explock", 0, 0);
130 mp->mnt_pcpu = uma_zalloc_pcpu(pcpu_zone_16, M_WAITOK | M_ZERO);
131 mp->mnt_ref = 0;
132 mp->mnt_vfs_ops = 1;
133 mp->mnt_rootvnode = NULL;
134 return (0);
135}
136
137static void
138mount_fini(void *mem, int size)

Callers

nothing calls this directly

Calls 3

mtx_initFunction · 0.85
lockinitFunction · 0.85
uma_zalloc_pcpuFunction · 0.50

Tested by

no test coverage detected