Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7551
b: refs/heads/master
c: 91c46e2
h: refs/heads/master
i:
  7549: 01a6935
  7547: d2b335b
  7543: 3a202d6
  7535: f43e233
  7519: 9f779d5
  7487: 269c217
  7423: 6decc40
v: v3
  • Loading branch information
Pablo Neira Ayuso authored and David S. Miller committed Sep 6, 2005
1 parent ed18941 commit 3a74a2c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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: e7dfb09a3624a32df2dd00683875d0e56406a603
refs/heads/master: 91c46e2e60da0b43a1e8740729737318862f64eb
8 changes: 4 additions & 4 deletions trunk/net/ipv4/netfilter/ip_conntrack_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,9 @@ void ip_conntrack_unexpect_related(struct ip_conntrack_expect *exp)
write_unlock_bh(&ip_conntrack_lock);
}

/* We don't increase the master conntrack refcount for non-fulfilled
* conntracks. During the conntrack destruction, the expectations are
* always killed before the conntrack itself */
struct ip_conntrack_expect *ip_conntrack_expect_alloc(struct ip_conntrack *me)
{
struct ip_conntrack_expect *new;
Expand All @@ -948,17 +951,14 @@ struct ip_conntrack_expect *ip_conntrack_expect_alloc(struct ip_conntrack *me)
return NULL;
}
new->master = me;
atomic_inc(&new->master->ct_general.use);
atomic_set(&new->use, 1);
return new;
}

void ip_conntrack_expect_put(struct ip_conntrack_expect *exp)
{
if (atomic_dec_and_test(&exp->use)) {
ip_conntrack_put(exp->master);
if (atomic_dec_and_test(&exp->use))
kmem_cache_free(ip_conntrack_expect_cachep, exp);
}
}

static void ip_conntrack_expect_insert(struct ip_conntrack_expect *exp)
Expand Down

0 comments on commit 3a74a2c

Please sign in to comment.