Skip to content

Commit

Permalink
[NETFILTER]: Kill lockhelp.h
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jun 21, 2005
1 parent c9e3e8b commit e45b1be
Show file tree
Hide file tree
Showing 23 changed files with 160 additions and 302 deletions.
3 changes: 1 addition & 2 deletions include/linux/netfilter_ipv4/ip_conntrack_core.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#ifndef _IP_CONNTRACK_CORE_H
#define _IP_CONNTRACK_CORE_H
#include <linux/netfilter.h>
#include <linux/netfilter_ipv4/lockhelp.h>

/* This header is used to share core functionality between the
standalone connection tracking module, and the compatibility layer's use
Expand Down Expand Up @@ -47,6 +46,6 @@ static inline int ip_conntrack_confirm(struct sk_buff **pskb)

extern struct list_head *ip_conntrack_hash;
extern struct list_head ip_conntrack_expect_list;
DECLARE_RWLOCK_EXTERN(ip_conntrack_lock);
extern rwlock_t ip_conntrack_lock;
#endif /* _IP_CONNTRACK_CORE_H */

3 changes: 1 addition & 2 deletions include/linux/netfilter_ipv4/ip_nat.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,9 @@ struct ip_nat_multi_range_compat

#ifdef __KERNEL__
#include <linux/list.h>
#include <linux/netfilter_ipv4/lockhelp.h>

/* Protects NAT hash tables, and NAT-private part of conntracks. */
DECLARE_RWLOCK_EXTERN(ip_nat_lock);
extern rwlock_t ip_nat_lock;

/* The structure embedded in the conntrack structure. */
struct ip_nat_info
Expand Down
1 change: 0 additions & 1 deletion include/linux/netfilter_ipv4/listhelp.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
#define _LISTHELP_H
#include <linux/config.h>
#include <linux/list.h>
#include <linux/netfilter_ipv4/lockhelp.h>

/* Header to do more comprehensive job than linux/list.h; assume list
is first entry in structure. */
Expand Down
129 changes: 0 additions & 129 deletions include/linux/netfilter_ipv4/lockhelp.h

This file was deleted.

1 change: 0 additions & 1 deletion net/ipv4/netfilter/arp_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ static DECLARE_MUTEX(arpt_mutex);

#define ASSERT_READ_LOCK(x) ARP_NF_ASSERT(down_trylock(&arpt_mutex) != 0)
#define ASSERT_WRITE_LOCK(x) ARP_NF_ASSERT(down_trylock(&arpt_mutex) != 0)
#include <linux/netfilter_ipv4/lockhelp.h>
#include <linux/netfilter_ipv4/listhelp.h>

struct arpt_table_info {
Expand Down
7 changes: 3 additions & 4 deletions net/ipv4/netfilter/ip_conntrack_amanda.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <net/checksum.h>
#include <net/udp.h>

#include <linux/netfilter_ipv4/lockhelp.h>
#include <linux/netfilter_ipv4/ip_conntrack_helper.h>
#include <linux/netfilter_ipv4/ip_conntrack_amanda.h>

Expand All @@ -42,7 +41,7 @@ static char *conns[] = { "DATA ", "MESG ", "INDEX " };

/* This is slow, but it's simple. --RR */
static char amanda_buffer[65536];
static DECLARE_LOCK(amanda_buffer_lock);
static DEFINE_SPINLOCK(amanda_buffer_lock);

unsigned int (*ip_nat_amanda_hook)(struct sk_buff **pskb,
enum ip_conntrack_info ctinfo,
Expand Down Expand Up @@ -76,7 +75,7 @@ static int help(struct sk_buff **pskb,
return NF_ACCEPT;
}

LOCK_BH(&amanda_buffer_lock);
spin_lock_bh(&amanda_buffer_lock);
skb_copy_bits(*pskb, dataoff, amanda_buffer, (*pskb)->len - dataoff);
data = amanda_buffer;
data_limit = amanda_buffer + (*pskb)->len - dataoff;
Expand Down Expand Up @@ -134,7 +133,7 @@ static int help(struct sk_buff **pskb,
}

out:
UNLOCK_BH(&amanda_buffer_lock);
spin_unlock_bh(&amanda_buffer_lock);
return ret;
}

Expand Down
Loading

0 comments on commit e45b1be

Please sign in to comment.