* Release rules attached to the racct. */
| 2163 | * Release rules attached to the racct. |
| 2164 | */ |
| 2165 | void |
| 2166 | rctl_racct_release(struct racct *racct) |
| 2167 | { |
| 2168 | struct rctl_rule_link *link; |
| 2169 | |
| 2170 | ASSERT_RACCT_ENABLED(); |
| 2171 | RACCT_LOCK_ASSERT(); |
| 2172 | |
| 2173 | while (!LIST_EMPTY(&racct->r_rule_links)) { |
| 2174 | link = LIST_FIRST(&racct->r_rule_links); |
| 2175 | LIST_REMOVE(link, rrl_next); |
| 2176 | rctl_rule_release(link->rrl_rule); |
| 2177 | uma_zfree(rctl_rule_link_zone, link); |
| 2178 | } |
| 2179 | } |
| 2180 | |
| 2181 | static void |
| 2182 | rctl_init(void) |
no test coverage detected