FreeBSD/sys/kern/kern_rctl.c
/*
 * Remove limits for a rules matching the filter and release
 * the refcounts for the rules, possibly freeing them.  Returns
 * the number of limit structures removed.
 */
Remove limits for a rules matching the filter and release
the refcounts for the rules, possibly freeing them.  Returns
the number of limit structures removed.
Remove limits for a rules matching the filter and release the refcounts for the rules possibly freeing them . Returns the number of limit structures removed .
static int
rctl_racct_remove_rules(struct racct *racct,
    const struct rctl_rule *filter)
{
	struct rctl_rule_link *link, *linktmp;
	int removed = 0;
	ASSERT_RACCT_ENABLED();
	RACCT_LOCK_ASSERT();
	LIST_FOREACH_SAFE(link, &racct->r_rule_links, rrl_next, linktmp) {
		if (!rctl_rule_matches(link->rrl_rule, filter))
			continue;
		LIST_REMOVE(link, rrl_next);
		rctl_rule_release(link->rrl_rule);
		uma_zfree(rctl_rule_link_zone, link);
		removed++;
	}
	return (removed);
}
static int rctl_racct_remove_rules ( struct racct * racct , const struct rctl_rule * filter ) { struct rctl_rule_link * link , * linktmp ; int removed = 0 ; ASSERT_RACCT_ENABLED ( ) ; RACCT_LOCK_ASSERT ( ) ; LIST_FOREACH_SAFE ( link , & racct -> r_rule_links , rrl_next , linktmp ) { if ( ! rctl_rule_matches ( link -> rrl_rule , filter ) ) continue ; LIST_REMOVE ( link , rrl_next ) ; rctl_rule_release ( link -> rrl_rule ) ; uma_zfree ( rctl_rule_link_zone , link ) ; removed ++ ; } return ( removed ) ; }
Remove limits for a rules matching the filter and release
 the refcounts for the rules, possibly freeing them.
Remove limits for a rules matching the filter and release the refcounts for the rules possibly freeing them .