Skip to content

Commit

Permalink
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/kaber/nf-2.6
  • Loading branch information
David S. Miller committed Jun 15, 2010
2 parents 28c8e47 + aea9d71 commit 2107134
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/netfilter/ipvs/ip_vs_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ static inline int ip_vs_conn_hash(struct ip_vs_conn *cp)
hash = ip_vs_conn_hashkey(cp->af, cp->protocol, &cp->caddr, cp->cport);

ct_write_lock(hash);
spin_lock(&cp->lock);

if (!(cp->flags & IP_VS_CONN_F_HASHED)) {
list_add(&cp->c_list, &ip_vs_conn_tab[hash]);
Expand All @@ -174,6 +175,7 @@ static inline int ip_vs_conn_hash(struct ip_vs_conn *cp)
ret = 0;
}

spin_unlock(&cp->lock);
ct_write_unlock(hash);

return ret;
Expand All @@ -193,6 +195,7 @@ static inline int ip_vs_conn_unhash(struct ip_vs_conn *cp)
hash = ip_vs_conn_hashkey(cp->af, cp->protocol, &cp->caddr, cp->cport);

ct_write_lock(hash);
spin_lock(&cp->lock);

if (cp->flags & IP_VS_CONN_F_HASHED) {
list_del(&cp->c_list);
Expand All @@ -202,6 +205,7 @@ static inline int ip_vs_conn_unhash(struct ip_vs_conn *cp)
} else
ret = 0;

spin_unlock(&cp->lock);
ct_write_unlock(hash);

return ret;
Expand Down

0 comments on commit 2107134

Please sign in to comment.