diff options
Diffstat (limited to 'net/xfrm')
-rw-r--r-- | net/xfrm/xfrm_policy.c | 3 | ||||
-rw-r--r-- | net/xfrm/xfrm_user.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c index 536ccc95de89..e52cab3591dd 100644 --- a/net/xfrm/xfrm_policy.c +++ b/net/xfrm/xfrm_policy.c | |||
@@ -2557,11 +2557,12 @@ static void __xfrm_garbage_collect(struct net *net) | |||
2557 | } | 2557 | } |
2558 | } | 2558 | } |
2559 | 2559 | ||
2560 | static void xfrm_garbage_collect(struct net *net) | 2560 | void xfrm_garbage_collect(struct net *net) |
2561 | { | 2561 | { |
2562 | flow_cache_flush(); | 2562 | flow_cache_flush(); |
2563 | __xfrm_garbage_collect(net); | 2563 | __xfrm_garbage_collect(net); |
2564 | } | 2564 | } |
2565 | EXPORT_SYMBOL(xfrm_garbage_collect); | ||
2565 | 2566 | ||
2566 | static void xfrm_garbage_collect_deferred(struct net *net) | 2567 | static void xfrm_garbage_collect_deferred(struct net *net) |
2567 | { | 2568 | { |
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index aa778748c565..3f565e495ac6 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
@@ -1681,6 +1681,8 @@ static int xfrm_get_policy(struct sk_buff *skb, struct nlmsghdr *nlh, | |||
1681 | 1681 | ||
1682 | out: | 1682 | out: |
1683 | xfrm_pol_put(xp); | 1683 | xfrm_pol_put(xp); |
1684 | if (delete && err == 0) | ||
1685 | xfrm_garbage_collect(net); | ||
1684 | return err; | 1686 | return err; |
1685 | } | 1687 | } |
1686 | 1688 | ||