]> bbs.cooldavid.org Git - net-next-2.6.git/commit - net/decnet/dn_rules.c
net: Allow fib_rule_unregister to batch
authorEric W. Biederman <ebiederm@xmission.com>
Thu, 3 Dec 2009 20:22:55 +0000 (12:22 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Dec 2009 20:22:55 +0000 (12:22 -0800)
commite9c5158ac26affd5d8ce006521bdfb7148090e18
treea8d43fb446a1908175923f4109c977dcb84e4f91
parent3a765edadb28cc736d185f67d1ba6bedcc85f4b9
net: Allow fib_rule_unregister to batch

Refactor the code so fib_rules_register always takes a template instead
of the actual fib_rules_ops structure that will be used.  This is
required for network namespace support so 2 out of the 3 callers already
do this, it allows the error handling to be made common, and it allows
fib_rules_unregister to free the template for hte caller.

Modify fib_rules_unregister to use call_rcu instead of syncrhonize_rcu
to allw multiple namespaces to be cleaned up in the same rcu grace
period.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/fib_rules.h
net/core/fib_rules.c
net/decnet/dn_rules.c
net/ipv4/fib_rules.c
net/ipv6/fib6_rules.c