diff options
| author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2016-01-07 15:51:13 -0800 | 
|---|---|---|
| committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2016-01-07 15:51:13 -0800 | 
| commit | abaee091a18c19ccd86feb1c8374585d82e96777 (patch) | |
| tree | 01602bae73e1278c3d98dafe1c269049927c58ce /net/openvswitch/vport-netdev.c | |
| parent | a2746fb16e41b7c8f02aa4d2605ecce97abbebbd (diff) | |
| parent | 3f8d6f2a0797e8c650a47e5c1b5c2601a46f4293 (diff) | |
Merge branch 'jejb-scsi' into misc
Diffstat (limited to 'net/openvswitch/vport-netdev.c')
| -rw-r--r-- | net/openvswitch/vport-netdev.c | 8 | 
1 files changed, 6 insertions, 2 deletions
diff --git a/net/openvswitch/vport-netdev.c b/net/openvswitch/vport-netdev.c index b327368a3848..6b0190b987ec 100644 --- a/net/openvswitch/vport-netdev.c +++ b/net/openvswitch/vport-netdev.c @@ -180,9 +180,13 @@ void ovs_netdev_tunnel_destroy(struct vport *vport)  	if (vport->dev->priv_flags & IFF_OVS_DATAPATH)  		ovs_netdev_detach_dev(vport); -	/* Early release so we can unregister the device */ +	/* We can be invoked by both explicit vport deletion and +	 * underlying netdev deregistration; delete the link only +	 * if it's not already shutting down. +	 */ +	if (vport->dev->reg_state == NETREG_REGISTERED) +		rtnl_delete_link(vport->dev);  	dev_put(vport->dev); -	rtnl_delete_link(vport->dev);  	vport->dev = NULL;  	rtnl_unlock();  | 
