Although not strictly necessary, this will make this
function more consistent when compatibility for 2.6.36 is added.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jesse Gross <jesse@nicira.com>
/* Returns null if this device is not attached to a datapath. */
struct vport *netdev_get_vport(struct net_device *dev)
{
- return (struct vport *)dev->br_port;
+ return (struct vport *)rcu_dereference(dev->br_port);
}
struct vport_ops netdev_vport_ops = {