patch-2.2.16 linux/net/ipv4/ip_masq_mod.c
Next file: linux/net/ipv4/ipconfig.c
Previous file: linux/net/ipv4/icmp.c
Back to the patch index
Back to the overall index
- Lines: 43
- Date:
Wed Jun 7 14:26:44 2000
- Orig file:
v2.2.15/linux/net/ipv4/ip_masq_mod.c
- Orig date:
Mon Aug 9 12:04:41 1999
diff -urN v2.2.15/linux/net/ipv4/ip_masq_mod.c linux/net/ipv4/ip_masq_mod.c
@@ -23,6 +23,8 @@
#include <net/ip_masq.h>
#include <net/ip_masq_mod.h>
+#include <asm/spinlock.h>
+
#include <linux/ip_masq.h>
#ifdef CONFIG_KMOD
#include <linux/kmod.h>
@@ -87,28 +89,28 @@
{
struct ip_masq_mod **mmod_p;
- write_lock_bh(&masq_mod_lock);
+ spin_lock_irq(&masq_mod_lock);
for (mmod_p = &ip_masq_mod_lkp_base; *mmod_p ; mmod_p = &(*mmod_p)->next)
if (mmod == (*mmod_p)) {
*mmod_p = mmod->next;
mmod->next = NULL;
- write_unlock_bh(&masq_mod_lock);
+ spin_unlock_irq(&masq_mod_lock);
return 0;
}
- write_unlock_bh(&masq_mod_lock);
+ spin_unlock_irq(&masq_mod_lock);
return -EINVAL;
}
int ip_masq_mod_lkp_link(struct ip_masq_mod *mmod)
{
- write_lock_bh(&masq_mod_lock);
+ spin_lock_irq(&masq_mod_lock);
mmod->next = ip_masq_mod_lkp_base;
ip_masq_mod_lkp_base=mmod;
- write_unlock_bh(&masq_mod_lock);
+ spin_unlock_irq(&masq_mod_lock);
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)