2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 12:43:55 +08:00

vrf: simplify the netdev notifier function

We can drop the check because if vrf_ptr is present then we must have
the vrf device as a master and since we're running with rtnl it can't go
away.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Nikolay Aleksandrov 2015-08-18 20:28:04 +03:00 committed by David S. Miller
parent 3a4a27d3bd
commit 58aa90875d

View File

@ -624,9 +624,8 @@ static int vrf_device_event(struct notifier_block *unused,
if (!vrf_ptr || netif_is_vrf(dev))
goto out;
vrf_dev = __dev_get_by_index(dev_net(dev), vrf_ptr->ifindex);
if (vrf_dev)
vrf_del_slave(vrf_dev, dev);
vrf_dev = netdev_master_upper_dev_get(dev);
vrf_del_slave(vrf_dev, dev);
}
out:
return NOTIFY_DONE;