Merge branch 'ipv6_stable_privacy_address'
[firefly-linux-kernel-4.4.55.git] / include / net / fib_rules.h
index e584de16e4c3629ccebef06d000b47166e5cc65d..6d67383a5114bd1010908bc7c8328a41d52e0a3b 100644 (file)
@@ -58,7 +58,7 @@ struct fib_rules_ops {
                                             struct sk_buff *,
                                             struct fib_rule_hdr *,
                                             struct nlattr **);
-       void                    (*delete)(struct fib_rule *);
+       int                     (*delete)(struct fib_rule *);
        int                     (*compare)(struct fib_rule *,
                                           struct fib_rule_hdr *,
                                           struct nlattr **);
@@ -95,17 +95,10 @@ static inline void fib_rule_get(struct fib_rule *rule)
        atomic_inc(&rule->refcnt);
 }
 
-static inline void fib_rule_put_rcu(struct rcu_head *head)
-{
-       struct fib_rule *rule = container_of(head, struct fib_rule, rcu);
-       release_net(rule->fr_net);
-       kfree(rule);
-}
-
 static inline void fib_rule_put(struct fib_rule *rule)
 {
        if (atomic_dec_and_test(&rule->refcnt))
-               call_rcu(&rule->rcu, fib_rule_put_rcu);
+               kfree_rcu(rule, rcu);
 }
 
 static inline u32 frh_get_table(struct fib_rule_hdr *frh, struct nlattr **nla)