<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">

Patch from Stephen Hemminger &lt;shemminger@osdl.org&gt;

Eliminate brlock from vlan



 25-akpm/net/8021q/vlan.c     |    7 +++----
 25-akpm/net/8021q/vlan_dev.c |    1 -
 2 files changed, 3 insertions(+), 5 deletions(-)

diff -puN net/8021q/vlan.c~brlock-3 net/8021q/vlan.c
--- 25/net/8021q/vlan.c~brlock-3	Tue Mar 11 16:58:48 2003
+++ 25-akpm/net/8021q/vlan.c	Tue Mar 11 16:58:48 2003
@@ -29,7 +29,6 @@
 #include &lt;net/p8022.h&gt;
 #include &lt;net/arp.h&gt;
 #include &lt;linux/rtnetlink.h&gt;
-#include &lt;linux/brlock.h&gt;
 #include &lt;linux/notifier.h&gt;
 
 #include &lt;linux/if_vlan.h&gt;
@@ -68,7 +67,6 @@ static struct packet_type vlan_packet_ty
 	.dev =NULL,
 	.func = vlan_skb_recv, /* VLAN receive method */
 	.data = (void *)(-1),  /* Set here '(void *)1' when this code can SHARE SKBs */
-	.next = NULL
 };
 
 /* End of global variables definitions. */
@@ -231,9 +229,10 @@ static int unregister_vlan_dev(struct ne
 				real_dev-&gt;vlan_rx_kill_vid(real_dev, vlan_id);
 			}
 
-			br_write_lock(BR_NETPROTO_LOCK);
 			grp-&gt;vlan_devices[vlan_id] = NULL;
-			br_write_unlock(BR_NETPROTO_LOCK);
+
+			/* wait for RCU in network receive */
+			synchronize_kernel();
 
 
 			/* Caller unregisters (and if necessary, puts)
diff -puN net/8021q/vlan_dev.c~brlock-3 net/8021q/vlan_dev.c
--- 25/net/8021q/vlan_dev.c~brlock-3	Tue Mar 11 16:58:48 2003
+++ 25-akpm/net/8021q/vlan_dev.c	Tue Mar 11 16:58:48 2003
@@ -31,7 +31,6 @@
 #include &lt;net/datalink.h&gt;
 #include &lt;net/p8022.h&gt;
 #include &lt;net/arp.h&gt;
-#include &lt;linux/brlock.h&gt;
 
 #include "vlan.h"
 #include "vlanproc.h"

_
</pre></body></html>