Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38561
b: refs/heads/master
c: ae8c057
h: refs/heads/master
i:
  38559: 65347f0
v: v3
  • Loading branch information
David S. Miller committed Oct 4, 2006
1 parent f4498ea commit 8e1cb1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 667bbcb6c099d1b74f95c6963ddf37a32e7afc29
refs/heads/master: ae8c05779ac2f286b872db9ebea0c3c0a031ad1e
7 changes: 5 additions & 2 deletions trunk/net/xfrm/xfrm_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -778,8 +778,9 @@ void xfrm_policy_flush(u8 type)
for (dir = 0; dir < XFRM_POLICY_MAX; dir++) {
struct xfrm_policy *pol;
struct hlist_node *entry;
int i;
int i, killed;

killed = 0;
again1:
hlist_for_each_entry(pol, entry,
&xfrm_policy_inexact[dir], bydst) {
Expand All @@ -790,6 +791,7 @@ void xfrm_policy_flush(u8 type)
write_unlock_bh(&xfrm_policy_lock);

xfrm_policy_kill(pol);
killed++;

write_lock_bh(&xfrm_policy_lock);
goto again1;
Expand All @@ -807,13 +809,14 @@ void xfrm_policy_flush(u8 type)
write_unlock_bh(&xfrm_policy_lock);

xfrm_policy_kill(pol);
killed++;

write_lock_bh(&xfrm_policy_lock);
goto again2;
}
}

xfrm_policy_count[dir] = 0;
xfrm_policy_count[dir] -= killed;
}
atomic_inc(&flow_cache_genid);
write_unlock_bh(&xfrm_policy_lock);
Expand Down

0 comments on commit 8e1cb1e

Please sign in to comment.