diff options
author | Martin Josefsson <gandalf@wlug.westbo.se> | 2006-11-28 20:35:09 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 00:31:11 -0500 |
commit | 951d36cace3d3ad2ac6c222e126aed4113ad2bf7 (patch) | |
tree | a1fb1c53fad205937db55ea352c8b220e08fbedf /net/netfilter | |
parent | ae5718fb3dd0a11a4c9a061bf86417d52d58a6b3 (diff) |
[NETFILTER]: nf_conntrack: remove ASSERT_{READ,WRITE}_LOCK
Remove the usage of ASSERT_READ_LOCK/ASSERT_WRITE_LOCK in nf_conntrack,
it didn't do anything, it was just an empty define and it uglified the code.
Signed-off-by: Martin Josefsson <gandalf@wlug.westbo.se>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/nf_conntrack_core.c | 7 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_standalone.c | 4 |
2 files changed, 0 insertions, 11 deletions
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c index 73615d32a80c..ab161b7a76a3 100644 --- a/net/netfilter/nf_conntrack_core.c +++ b/net/netfilter/nf_conntrack_core.c | |||
@@ -47,11 +47,6 @@ | |||
47 | #include <linux/netdevice.h> | 47 | #include <linux/netdevice.h> |
48 | #include <linux/socket.h> | 48 | #include <linux/socket.h> |
49 | 49 | ||
50 | /* This rwlock protects the main hash table, protocol/helper/expected | ||
51 | registrations, conntrack timers*/ | ||
52 | #define ASSERT_READ_LOCK(x) | ||
53 | #define ASSERT_WRITE_LOCK(x) | ||
54 | |||
55 | #include <net/netfilter/nf_conntrack.h> | 50 | #include <net/netfilter/nf_conntrack.h> |
56 | #include <net/netfilter/nf_conntrack_l3proto.h> | 51 | #include <net/netfilter/nf_conntrack_l3proto.h> |
57 | #include <net/netfilter/nf_conntrack_l4proto.h> | 52 | #include <net/netfilter/nf_conntrack_l4proto.h> |
@@ -292,7 +287,6 @@ static void | |||
292 | clean_from_lists(struct nf_conn *ct) | 287 | clean_from_lists(struct nf_conn *ct) |
293 | { | 288 | { |
294 | DEBUGP("clean_from_lists(%p)\n", ct); | 289 | DEBUGP("clean_from_lists(%p)\n", ct); |
295 | ASSERT_WRITE_LOCK(&nf_conntrack_lock); | ||
296 | list_del(&ct->tuplehash[IP_CT_DIR_ORIGINAL].list); | 290 | list_del(&ct->tuplehash[IP_CT_DIR_ORIGINAL].list); |
297 | list_del(&ct->tuplehash[IP_CT_DIR_REPLY].list); | 291 | list_del(&ct->tuplehash[IP_CT_DIR_REPLY].list); |
298 | 292 | ||
@@ -371,7 +365,6 @@ __nf_conntrack_find(const struct nf_conntrack_tuple *tuple, | |||
371 | struct nf_conntrack_tuple_hash *h; | 365 | struct nf_conntrack_tuple_hash *h; |
372 | unsigned int hash = hash_conntrack(tuple); | 366 | unsigned int hash = hash_conntrack(tuple); |
373 | 367 | ||
374 | ASSERT_READ_LOCK(&nf_conntrack_lock); | ||
375 | list_for_each_entry(h, &nf_conntrack_hash[hash], list) { | 368 | list_for_each_entry(h, &nf_conntrack_hash[hash], list) { |
376 | if (nf_ct_tuplehash_to_ctrack(h) != ignored_conntrack && | 369 | if (nf_ct_tuplehash_to_ctrack(h) != ignored_conntrack && |
377 | nf_ct_tuple_equal(tuple, &h->tuple)) { | 370 | nf_ct_tuple_equal(tuple, &h->tuple)) { |
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c index 6ebac7d9ee69..f87d333b0c0c 100644 --- a/net/netfilter/nf_conntrack_standalone.c +++ b/net/netfilter/nf_conntrack_standalone.c | |||
@@ -29,9 +29,6 @@ | |||
29 | #include <linux/sysctl.h> | 29 | #include <linux/sysctl.h> |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #define ASSERT_READ_LOCK(x) | ||
33 | #define ASSERT_WRITE_LOCK(x) | ||
34 | |||
35 | #include <net/netfilter/nf_conntrack.h> | 32 | #include <net/netfilter/nf_conntrack.h> |
36 | #include <net/netfilter/nf_conntrack_core.h> | 33 | #include <net/netfilter/nf_conntrack_core.h> |
37 | #include <net/netfilter/nf_conntrack_l3proto.h> | 34 | #include <net/netfilter/nf_conntrack_l3proto.h> |
@@ -137,7 +134,6 @@ static int ct_seq_show(struct seq_file *s, void *v) | |||
137 | struct nf_conntrack_l3proto *l3proto; | 134 | struct nf_conntrack_l3proto *l3proto; |
138 | struct nf_conntrack_l4proto *l4proto; | 135 | struct nf_conntrack_l4proto *l4proto; |
139 | 136 | ||
140 | ASSERT_READ_LOCK(&nf_conntrack_lock); | ||
141 | NF_CT_ASSERT(conntrack); | 137 | NF_CT_ASSERT(conntrack); |
142 | 138 | ||
143 | /* we only want to print DIR_ORIGINAL */ | 139 | /* we only want to print DIR_ORIGINAL */ |