From: Ran Xiaokai <ran.xiaokai@zte.com.cn>
The rcu callback dp_meter_instance_free_rcu() simply calls kvfree().
It's better to directly call kvfree_rcu().
Signed-off-by: Ran Xiaokai <ran.xiaokai@zte.com.cn>
---
net/openvswitch/meter.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/net/openvswitch/meter.c b/net/openvswitch/meter.c
index cc08e0403909..d99efb9ce1a0 100644
--- a/net/openvswitch/meter.c
+++ b/net/openvswitch/meter.c
@@ -83,14 +83,6 @@ static void dp_meter_instance_free(struct dp_meter_instance *ti)
kvfree(ti);
}
-static void dp_meter_instance_free_rcu(struct rcu_head *rcu)
-{
- struct dp_meter_instance *ti;
-
- ti = container_of(rcu, struct dp_meter_instance, rcu);
- kvfree(ti);
-}
-
static int
dp_meter_instance_realloc(struct dp_meter_table *tbl, u32 size)
{
@@ -108,7 +100,7 @@ dp_meter_instance_realloc(struct dp_meter_table *tbl, u32 size)
new_ti->dp_meters[i] = ti->dp_meters[i];
rcu_assign_pointer(tbl->ti, new_ti);
- call_rcu(&ti->rcu, dp_meter_instance_free_rcu);
+ kvfree_rcu(ti, rcu);
return 0;
}
--
2.17.1