[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>
This commit is contained in:
committed by
David S. Miller
parent
ae5718fb3d
commit
951d36cace
@@ -47,11 +47,6 @@
|
|||||||
#include <linux/netdevice.h>
|
#include <linux/netdevice.h>
|
||||||
#include <linux/socket.h>
|
#include <linux/socket.h>
|
||||||
|
|
||||||
/* This rwlock protects the main hash table, protocol/helper/expected
|
|
||||||
registrations, conntrack timers*/
|
|
||||||
#define ASSERT_READ_LOCK(x)
|
|
||||||
#define ASSERT_WRITE_LOCK(x)
|
|
||||||
|
|
||||||
#include <net/netfilter/nf_conntrack.h>
|
#include <net/netfilter/nf_conntrack.h>
|
||||||
#include <net/netfilter/nf_conntrack_l3proto.h>
|
#include <net/netfilter/nf_conntrack_l3proto.h>
|
||||||
#include <net/netfilter/nf_conntrack_l4proto.h>
|
#include <net/netfilter/nf_conntrack_l4proto.h>
|
||||||
@@ -292,7 +287,6 @@ static void
|
|||||||
clean_from_lists(struct nf_conn *ct)
|
clean_from_lists(struct nf_conn *ct)
|
||||||
{
|
{
|
||||||
DEBUGP("clean_from_lists(%p)\n", ct);
|
DEBUGP("clean_from_lists(%p)\n", ct);
|
||||||
ASSERT_WRITE_LOCK(&nf_conntrack_lock);
|
|
||||||
list_del(&ct->tuplehash[IP_CT_DIR_ORIGINAL].list);
|
list_del(&ct->tuplehash[IP_CT_DIR_ORIGINAL].list);
|
||||||
list_del(&ct->tuplehash[IP_CT_DIR_REPLY].list);
|
list_del(&ct->tuplehash[IP_CT_DIR_REPLY].list);
|
||||||
|
|
||||||
@@ -371,7 +365,6 @@ __nf_conntrack_find(const struct nf_conntrack_tuple *tuple,
|
|||||||
struct nf_conntrack_tuple_hash *h;
|
struct nf_conntrack_tuple_hash *h;
|
||||||
unsigned int hash = hash_conntrack(tuple);
|
unsigned int hash = hash_conntrack(tuple);
|
||||||
|
|
||||||
ASSERT_READ_LOCK(&nf_conntrack_lock);
|
|
||||||
list_for_each_entry(h, &nf_conntrack_hash[hash], list) {
|
list_for_each_entry(h, &nf_conntrack_hash[hash], list) {
|
||||||
if (nf_ct_tuplehash_to_ctrack(h) != ignored_conntrack &&
|
if (nf_ct_tuplehash_to_ctrack(h) != ignored_conntrack &&
|
||||||
nf_ct_tuple_equal(tuple, &h->tuple)) {
|
nf_ct_tuple_equal(tuple, &h->tuple)) {
|
||||||
|
@@ -29,9 +29,6 @@
|
|||||||
#include <linux/sysctl.h>
|
#include <linux/sysctl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define ASSERT_READ_LOCK(x)
|
|
||||||
#define ASSERT_WRITE_LOCK(x)
|
|
||||||
|
|
||||||
#include <net/netfilter/nf_conntrack.h>
|
#include <net/netfilter/nf_conntrack.h>
|
||||||
#include <net/netfilter/nf_conntrack_core.h>
|
#include <net/netfilter/nf_conntrack_core.h>
|
||||||
#include <net/netfilter/nf_conntrack_l3proto.h>
|
#include <net/netfilter/nf_conntrack_l3proto.h>
|
||||||
@@ -137,7 +134,6 @@ static int ct_seq_show(struct seq_file *s, void *v)
|
|||||||
struct nf_conntrack_l3proto *l3proto;
|
struct nf_conntrack_l3proto *l3proto;
|
||||||
struct nf_conntrack_l4proto *l4proto;
|
struct nf_conntrack_l4proto *l4proto;
|
||||||
|
|
||||||
ASSERT_READ_LOCK(&nf_conntrack_lock);
|
|
||||||
NF_CT_ASSERT(conntrack);
|
NF_CT_ASSERT(conntrack);
|
||||||
|
|
||||||
/* we only want to print DIR_ORIGINAL */
|
/* we only want to print DIR_ORIGINAL */
|
||||||
|
Reference in New Issue
Block a user