]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/bridge/br_notify.c
bridge: add RCU annotations to bridge port lookup
[net-next-2.6.git] / net / bridge / br_notify.c
index ef2175c8b91d1d39bda3942b053fff3a902d4ac6..7d337c9b6082a5f3d23efa47823db5b2d99f7e5a 100644 (file)
@@ -37,10 +37,10 @@ static int br_device_event(struct notifier_block *unused, unsigned long event, v
        int err;
 
        /* not a port of a bridge */
-       if (!br_port_exists(dev))
+       p = br_port_get_rtnl(dev);
+       if (!p)
                return NOTIFY_DONE;
 
-       p = br_port_get(dev);
        br = p->br;
 
        switch (event) {