Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 34609
b: refs/heads/master
c: 1c09539
h: refs/heads/master
i:
  34607: acf59ce
v: v3
  • Loading branch information
David S. Miller committed Sep 22, 2006
1 parent 1e84dbe commit 659dde8
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 20 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: c7f5ea3a4d1ae6b3b426e113358fdc57494bc754
refs/heads/master: 1c0953997567b22e32fdf85d3b4bc0f2461fd161
1 change: 0 additions & 1 deletion trunk/include/net/xfrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,6 @@ struct xfrm_state * xfrm_find_acq(u8 mode, u32 reqid, u8 proto,
int create, unsigned short family);
extern void xfrm_policy_flush(u8 type);
extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol);
extern int xfrm_flush_bundles(void);
extern int xfrm_bundle_ok(struct xfrm_dst *xdst, struct flowi *fl, int family, int strict);
extern void xfrm_init_pmtu(struct dst_entry *dst);

Expand Down
2 changes: 1 addition & 1 deletion trunk/net/xfrm/xfrm_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,7 @@ static void __xfrm_garbage_collect(void)
xfrm_prune_bundles(unused_bundle);
}

int xfrm_flush_bundles(void)
static int xfrm_flush_bundles(void)
{
xfrm_prune_bundles(stale_bundle);
return 0;
Expand Down
17 changes: 0 additions & 17 deletions trunk/net/xfrm/xfrm_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,6 @@ static struct work_struct xfrm_state_gc_work;
static HLIST_HEAD(xfrm_state_gc_list);
static DEFINE_SPINLOCK(xfrm_state_gc_lock);

static int xfrm_state_gc_flush_bundles;

int __xfrm_state_delete(struct xfrm_state *x);

static struct xfrm_state_afinfo *xfrm_state_get_afinfo(unsigned short family);
Expand Down Expand Up @@ -293,11 +291,6 @@ static void xfrm_state_gc_task(void *data)
struct hlist_node *entry, *tmp;
struct hlist_head gc_list;

if (xfrm_state_gc_flush_bundles) {
xfrm_state_gc_flush_bundles = 0;
xfrm_flush_bundles();
}

spin_lock_bh(&xfrm_state_gc_lock);
gc_list.first = xfrm_state_gc_list.first;
INIT_HLIST_HEAD(&xfrm_state_gc_list);
Expand Down Expand Up @@ -454,16 +447,6 @@ int __xfrm_state_delete(struct xfrm_state *x)
if (del_timer(&x->rtimer))
__xfrm_state_put(x);

/* The number two in this test is the reference
* mentioned in the comment below plus the reference
* our caller holds. A larger value means that
* there are DSTs attached to this xfrm_state.
*/
if (atomic_read(&x->refcnt) > 2) {
xfrm_state_gc_flush_bundles = 1;
schedule_work(&xfrm_state_gc_work);
}

/* All xfrm_state objects are created by xfrm_state_alloc.
* The xfrm_state_alloc call gives a reference, and that
* is what we are dropping here.
Expand Down

0 comments on commit 659dde8

Please sign in to comment.