* Evict the specified entry from the cache. */
| 134 | * Evict the specified entry from the cache. |
| 135 | */ |
| 136 | static void |
| 137 | vdev_cache_evict(vdev_cache_t *vc, vdev_cache_entry_t *ve) |
| 138 | { |
| 139 | ASSERT(MUTEX_HELD(&vc->vc_lock)); |
| 140 | ASSERT3P(ve->ve_fill_io, ==, NULL); |
| 141 | ASSERT3P(ve->ve_abd, !=, NULL); |
| 142 | |
| 143 | avl_remove(&vc->vc_lastused_tree, ve); |
| 144 | avl_remove(&vc->vc_offset_tree, ve); |
| 145 | abd_free(ve->ve_abd); |
| 146 | kmem_free(ve, sizeof (vdev_cache_entry_t)); |
| 147 | } |
| 148 | |
| 149 | /* |
| 150 | * Allocate an entry in the cache. At the point we don't have the data, |
no test coverage detected