* Directory vnodes with entries are held for two reasons: * 1. make them less of a target for reclamation in vnlru * 2. suffer smaller performance penalty in locked lookup as requeieing is avoided * * It will be feasible to stop doing it altogether if all filesystems start * supporting lockless lookup. */
| 539 | * supporting lockless lookup. |
| 540 | */ |
| 541 | static void |
| 542 | cache_hold_vnode(struct vnode *vp) |
| 543 | { |
| 544 | |
| 545 | cache_assert_vnode_locked(vp); |
| 546 | VNPASS(LIST_EMPTY(&vp->v_cache_src), vp); |
| 547 | vhold(vp); |
| 548 | counter_u64_add(numcachehv, 1); |
| 549 | } |
| 550 | |
| 551 | static void |
| 552 | cache_drop_vnode(struct vnode *vp) |
no test coverage detected