diff options
author | David S. Miller <davem@davemloft.net> | 2011-12-23 17:13:56 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-23 17:13:56 -0500 |
commit | abb434cb0539fb355c1c921f8fd761efbbac3462 (patch) | |
tree | 24a7d99ec161f8fd4dc9ff03c9c4cc93be883ce6 /net/xfrm | |
parent | 2494654d4890316e7340fb8b3458daad0474a1b9 (diff) | |
parent | 6350323ad8def2ac00d77cdee3b79c9b9fba75c4 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
net/bluetooth/l2cap_core.c
Just two overlapping changes, one added an initialization of
a local variable, and another change added a new local variable.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/xfrm')
-rw-r--r-- | net/xfrm/xfrm_policy.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index eb6b0b7781a5..7661576b6f45 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -2276,8 +2276,6 @@ static void __xfrm_garbage_collect(struct net *net) | |||
2276 | { | 2276 | { |
2277 | struct dst_entry *head, *next; | 2277 | struct dst_entry *head, *next; |
2278 | 2278 | ||
2279 | flow_cache_flush(); | ||
2280 | |||
2281 | spin_lock_bh(&xfrm_policy_sk_bundle_lock); | 2279 | spin_lock_bh(&xfrm_policy_sk_bundle_lock); |
2282 | head = xfrm_policy_sk_bundles; | 2280 | head = xfrm_policy_sk_bundles; |
2283 | xfrm_policy_sk_bundles = NULL; | 2281 | xfrm_policy_sk_bundles = NULL; |
@@ -2290,6 +2288,18 @@ static void __xfrm_garbage_collect(struct net *net) | |||
2290 | } | 2288 | } |
2291 | } | 2289 | } |
2292 | 2290 | ||
2291 | static void xfrm_garbage_collect(struct net *net) | ||
2292 | { | ||
2293 | flow_cache_flush(); | ||
2294 | __xfrm_garbage_collect(net); | ||
2295 | } | ||
2296 | |||
2297 | static void xfrm_garbage_collect_deferred(struct net *net) | ||
2298 | { | ||
2299 | flow_cache_flush_deferred(); | ||
2300 | __xfrm_garbage_collect(net); | ||
2301 | } | ||
2302 | |||
2293 | static void xfrm_init_pmtu(struct dst_entry *dst) | 2303 | static void xfrm_init_pmtu(struct dst_entry *dst) |
2294 | { | 2304 | { |
2295 | do { | 2305 | do { |
@@ -2422,7 +2432,7 @@ int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo) | |||
2422 | if (likely(dst_ops->neigh_lookup == NULL)) | 2432 | if (likely(dst_ops->neigh_lookup == NULL)) |
2423 | dst_ops->neigh_lookup = xfrm_neigh_lookup; | 2433 | dst_ops->neigh_lookup = xfrm_neigh_lookup; |
2424 | if (likely(afinfo->garbage_collect == NULL)) | 2434 | if (likely(afinfo->garbage_collect == NULL)) |
2425 | afinfo->garbage_collect = __xfrm_garbage_collect; | 2435 | afinfo->garbage_collect = xfrm_garbage_collect_deferred; |
2426 | xfrm_policy_afinfo[afinfo->family] = afinfo; | 2436 | xfrm_policy_afinfo[afinfo->family] = afinfo; |
2427 | } | 2437 | } |
2428 | write_unlock_bh(&xfrm_policy_afinfo_lock); | 2438 | write_unlock_bh(&xfrm_policy_afinfo_lock); |
@@ -2516,7 +2526,7 @@ static int xfrm_dev_event(struct notifier_block *this, unsigned long event, void | |||
2516 | 2526 | ||
2517 | switch (event) { | 2527 | switch (event) { |
2518 | case NETDEV_DOWN: | 2528 | case NETDEV_DOWN: |
2519 | __xfrm_garbage_collect(dev_net(dev)); | 2529 | xfrm_garbage_collect(dev_net(dev)); |
2520 | } | 2530 | } |
2521 | return NOTIFY_DONE; | 2531 | return NOTIFY_DONE; |
2522 | } | 2532 | } |