Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3921
b: refs/heads/master
c: fb3d894
h: refs/heads/master
i:
  3919: 6b1bc62
v: v3
  • Loading branch information
Neil Horman authored and David S. Miller committed Jun 28, 2005
1 parent a99590c commit 7a5ec00
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 22 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: 689be43945e9ca7dd704522e55af1b8a73a994d3
refs/heads/master: fb3d89498d268c8dedc1ab5b15fa64f536564577
25 changes: 4 additions & 21 deletions trunk/net/ipv4/ipvs/ip_vs_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,6 @@ void ip_vs_conn_expire_now(struct ip_vs_conn *cp)
{
if (del_timer(&cp->timer))
mod_timer(&cp->timer, jiffies);
__ip_vs_conn_put(cp);
}


Expand Down Expand Up @@ -764,7 +763,6 @@ void ip_vs_random_dropentry(void)
{
int idx;
struct ip_vs_conn *cp;
struct ip_vs_conn *ct;

/*
* Randomly scan 1/32 of the whole table every second
Expand Down Expand Up @@ -801,21 +799,12 @@ void ip_vs_random_dropentry(void)
continue;
}

/*
* Drop the entry, and drop its ct if not referenced
*/
atomic_inc(&cp->refcnt);
ct_write_unlock(hash);

if ((ct = cp->control))
atomic_inc(&ct->refcnt);
IP_VS_DBG(4, "del connection\n");
ip_vs_conn_expire_now(cp);
if (ct) {
if (cp->control) {
IP_VS_DBG(4, "del conn template\n");
ip_vs_conn_expire_now(ct);
ip_vs_conn_expire_now(cp->control);
}
ct_write_lock(hash);
}
ct_write_unlock(hash);
}
Expand All @@ -829,7 +818,6 @@ static void ip_vs_conn_flush(void)
{
int idx;
struct ip_vs_conn *cp;
struct ip_vs_conn *ct;

flush_again:
for (idx=0; idx<IP_VS_CONN_TAB_SIZE; idx++) {
Expand All @@ -839,18 +827,13 @@ static void ip_vs_conn_flush(void)
ct_write_lock_bh(idx);

list_for_each_entry(cp, &ip_vs_conn_tab[idx], c_list) {
atomic_inc(&cp->refcnt);
ct_write_unlock(idx);

if ((ct = cp->control))
atomic_inc(&ct->refcnt);
IP_VS_DBG(4, "del connection\n");
ip_vs_conn_expire_now(cp);
if (ct) {
if (cp->control) {
IP_VS_DBG(4, "del conn template\n");
ip_vs_conn_expire_now(ct);
ip_vs_conn_expire_now(cp->control);
}
ct_write_lock(idx);
}
ct_write_unlock_bh(idx);
}
Expand Down

0 comments on commit 7a5ec00

Please sign in to comment.