* Temporary binary compat, don't use. Call vnlru_free_vfsops instead. */
| 1291 | * Temporary binary compat, don't use. Call vnlru_free_vfsops instead. |
| 1292 | */ |
| 1293 | void |
| 1294 | vnlru_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 | |
| 1317 | struct vnode * |
| 1318 | vnlru_alloc_marker(void) |
nothing calls this directly
no test coverage detected