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

Function vnlru_free

freebsd/kern/vfs_subr.c:1293–1315  ·  view source on GitHub ↗

* Temporary binary compat, don't use. Call vnlru_free_vfsops instead. */

Source from the content-addressed store, hash-verified

1291 * Temporary binary compat, don't use. Call vnlru_free_vfsops instead.
1292 */
1293void
1294vnlru_free(int count, struct vfsops *mnt_op)
1295{
1296 struct vnode *mvp;
1297
1298 if (count == 0)
1299 return;
1300 mtx_lock(&vnode_list_mtx);
1301 mvp = vnode_list_free_marker;
1302 if (vnlru_free_impl(count, mnt_op, mvp) == 0) {
1303 /*
1304 * It is possible the marker was moved over eligible vnodes by
1305 * callers which filtered by different ops. If so, start from
1306 * scratch.
1307 */
1308 if (vnlru_read_freevnodes() > 0) {
1309 TAILQ_REMOVE(&vnode_list, mvp, v_vnodelist);
1310 TAILQ_INSERT_HEAD(&vnode_list, mvp, v_vnodelist);
1311 }
1312 vnlru_free_impl(count, mnt_op, mvp);
1313 }
1314 mtx_unlock(&vnode_list_mtx);
1315}
1316
1317struct vnode *
1318vnlru_alloc_marker(void)

Callers

nothing calls this directly

Calls 4

vnlru_free_implFunction · 0.85
vnlru_read_freevnodesFunction · 0.85
mtx_lockFunction · 0.70
mtx_unlockFunction · 0.70

Tested by

no test coverage detected