[NETFILTER] kill lockhelp.h for u32 ------------------------------------------------------------------------------ ipt_u32.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) ------------------------------------------------------------------------------ Index: linux-2.6/net/ipv4/netfilter/ipt_u32.c =================================================================== --- linux-2.6/net/ipv4/netfilter/ipt_u32.c (révision 4251) +++ linux-2.6/net/ipv4/netfilter/ipt_u32.c (copie de travail) @@ -105,7 +105,6 @@ #include #include -#include /* #include for timing */ @@ -115,7 +114,7 @@ /* This is slow, but it's simple. --RR */ static char u32_buffer[65536]; -static DECLARE_LOCK(u32_lock); +static DEFINE_SPINLOCK(u32_lock); static int match(const struct sk_buff *skb, @@ -136,7 +135,7 @@ u_int32_t AttPos; - LOCK_BH(&u32_lock); + spin_lock_bh(&u32_lock); head = skb_header_pointer(skb, 0, skb->len, u32_buffer); BUG_ON(head == NULL); @@ -148,7 +147,7 @@ AttPos = 0; pos = data->tests[testind].location[0].number; if (AttPos + pos + 3 > skb->len || AttPos + pos < 0){ - UNLOCK_BH(&u32_lock); + spin_unlock_bh(&u32_lock); return 0; } val = (base[pos]<<24) + (base[pos+1]<<16) + @@ -190,13 +189,13 @@ /* cycles2 = get_cycles(); printk("failed %d in %d cycles\n", testind, cycles2-cycles1); */ - UNLOCK_BH(&u32_lock); + spin_unlock_bh(&u32_lock); return 0; } } /* cycles2 = get_cycles(); printk("succeeded in %d cycles\n", cycles2-cycles1); */ - UNLOCK_BH(&u32_lock); + spin_unlock_bh(&u32_lock); return 1; }