示例#1
0
static void tcf_sample_cleanup(struct tc_action *a)
{
	struct tcf_sample *s = to_sample(a);
	struct psample_group *psample_group;

	psample_group = rtnl_dereference(s->psample_group);
	RCU_INIT_POINTER(s->psample_group, NULL);
	psample_group_put(psample_group);
}
示例#2
0
static void tcf_sample_cleanup_rcu(struct rcu_head *rcu)
{
	struct tcf_sample *s = container_of(rcu, struct tcf_sample, rcu);
	struct psample_group *psample_group;

	psample_group = rcu_dereference_protected(s->psample_group, 1);
	RCU_INIT_POINTER(s->psample_group, NULL);
	psample_group_put(psample_group);
}
示例#3
0
文件: act_sample.c 项目: Lyude/linux
static void tcf_sample_cleanup(struct tc_action *a)
{
	struct tcf_sample *s = to_sample(a);
	struct psample_group *psample_group;

	/* last reference to action, no need to lock */
	psample_group = rcu_dereference_protected(s->psample_group, 1);
	RCU_INIT_POINTER(s->psample_group, NULL);
	if (psample_group)
		psample_group_put(psample_group);
}