Skip to contentSkip to conversation

Add struct net to flush_cache in fib_rules_ops

PATCH New Denis V. Lunev 1 participant 1 message Oct 18, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add struct net to flush_cache in fib_rules_ops

commit d5daed837d7b0d2492a4226eea248cc7d92bcf81

Author: Denis V. Lunev <[email protected]>
Date:   Thu Oct 18 12:41:20 2007 +0400

Add struct net to flush_cache in fib_rules_ops

include/net/fib_rules.h +2 -1
index ba8caa9..163c920 100644
@@ -61,7 +61,8 @@ struct fib_rules_ops
 
 	/* Called after modifications to the rules set, must flush
 	 * the route cache if one exists. */
-	void			(*flush_cache)(struct fib_rules_ops *ops);
+	void			(*flush_cache)(struct net *net,
+						struct fib_rules_ops *ops);
 
 	int			nlgroup;
 	const struct nla_policy	*policy;
net/core/fib_rules.c +4 -4
index 407d4bf..220bee6 100644
@@ -43,10 +43,10 @@ static void rules_ops_put(struct fib_rules_ops *ops)
 		module_put(ops->owner);
 }
 
-static void flush_route_cache(struct fib_rules_ops *ops)
+static void flush_route_cache(struct net *net, struct fib_rules_ops *ops)
 {
 	if (ops->flush_cache)
-		ops->flush_cache(ops);
+		ops->flush_cache(net, ops);
 }
 
 int fib_rules_register(struct net *net, struct fib_rules_ops *ops)
@@ -323,7 +323,7 @@ static int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
 		list_add_rcu(&rule->list, ops->rules_list);
 
 	notify_rule_change(net, RTM_NEWRULE, rule, ops, nlh, NETLINK_CB(skb).pid);
-	flush_route_cache(ops);
+	flush_route_cache(net, ops);
 	rules_ops_put(ops);
 	return 0;
 
@@ -415,7 +415,7 @@ static int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
 		notify_rule_change(net, RTM_DELRULE, rule, ops, nlh,
 				   NETLINK_CB(skb).pid);
 		fib_rule_put(rule);
-		flush_route_cache(ops);
+		flush_route_cache(net, ops);
 		rules_ops_put(ops);
 		return 0;
 	}
net/decnet/dn_rules.c +1 -1
index 9f7a206..2850b66 100644
@@ -243,7 +243,7 @@ static u32 dn_fib_rule_default_pref(struct fib_rules_ops *ops)
 	return 0;
 }
 
-static void dn_fib_rule_flush_cache(struct fib_rules_ops *ops)
+static void dn_fib_rule_flush_cache(struct net *net, struct fib_rules_ops *ops)
 {
 	dn_rt_cache_flush(-1);
 }
net/ipv4/fib_rules.c +1 -1
index 6bf5b33..c93b278 100644
@@ -279,7 +279,7 @@ static size_t fib4_rule_nlmsg_payload(struct fib_rule *rule)
 	       + nla_total_size(4); /* flow */
 }
 
-static void fib4_rule_flush_cache(struct fib_rules_ops *ops)
+static void fib4_rule_flush_cache(struct net *net, struct fib_rules_ops *ops)
 {
 	rt_cache_flush(-1);
 }