| 684 | } |
| 685 | |
| 686 | static void |
| 687 | cache_free_batch(struct cache_freebatch *batch) |
| 688 | { |
| 689 | struct namecache *ncp, *nnp; |
| 690 | int i; |
| 691 | |
| 692 | i = 0; |
| 693 | if (TAILQ_EMPTY(batch)) |
| 694 | goto out; |
| 695 | TAILQ_FOREACH_SAFE(ncp, batch, nc_dst, nnp) { |
| 696 | if ((ncp->nc_flag & NCF_DVDROP) != 0) { |
| 697 | cache_drop_vnode(ncp->nc_dvp); |
| 698 | } |
| 699 | cache_free_uma(ncp); |
| 700 | i++; |
| 701 | } |
| 702 | atomic_subtract_long(&numcache, i); |
| 703 | out: |
| 704 | SDT_PROBE1(vfs, namecache, purge, batch, i); |
| 705 | } |
| 706 | |
| 707 | /* |
| 708 | * TODO: With the value stored we can do better than computing the hash based |
no test coverage detected