Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 58aa9087 authored by Nikolay Aleksandrov's avatar Nikolay Aleksandrov Committed by David S. Miller
Browse files

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: default avatarNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3a4a27d3
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -624,8 +624,7 @@ 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_dev = netdev_master_upper_dev_get(dev);
		vrf_del_slave(vrf_dev, dev);
	}
out: