patch-2.2.5 linux/net/ipv4/ip_gre.c

Next file: linux/net/ipv4/ip_output.c
Previous file: linux/net/ipv4/igmp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.4/linux/net/ipv4/ip_gre.c linux/net/ipv4/ip_gre.c
@@ -211,10 +211,9 @@
 {
 	struct ip_tunnel **tp = ipgre_bucket(t);
 
-	net_serialize_enter();
 	t->next = *tp;
+	wmb();
 	*tp = t;
-	net_serialize_leave();
 }
 
 static void ipgre_tunnel_unlink(struct ip_tunnel *t)
@@ -223,9 +222,8 @@
 
 	for (tp = ipgre_bucket(t); *tp; tp = &(*tp)->next) {
 		if (t == *tp) {
-			net_serialize_enter();
 			*tp = t->next;
-			net_serialize_leave();
+			synchronize_bh();
 			break;
 		}
 	}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)