From patchwork Fri Oct 13 16:12:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: venet: destroy VE IP on venet destruction in NFS is enabled From: Stanislav Kinsburskiy X-Patchwork-Id: 6692 Message-Id: <20171013161211.19370.82241.stgit@localhost.localdomain> To: Date: Fri, 13 Oct 2017 20:12:15 +0400 We skip VE IP destruion in shutdown hook, if NFS is enabled in CT (to allow NFS mounts to disappear. Thus we have to destroy it with venet device. https://jira.sw.ru/browse/PSBM-75120 Signed-off-by: Stanislav Kinsburskiy --- drivers/net/venetdev.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/venetdev.c b/drivers/net/venetdev.c index 7a546cc..fad232b 100644 --- a/drivers/net/venetdev.c +++ b/drivers/net/venetdev.c @@ -759,9 +759,12 @@ static void venet_dellink(struct net_device *dev, struct list_head *head) struct ve_struct *env = dev->nd_net->owner_ve; /* We check ve_netns to avoid races with veip SHUTDOWN hook, called from - * ve_exit_ns() + * ve_exit_ns(). + * Also, in veip SHUTDOWN hook we skip veip destructionif, if container + * has VE_FEATURE_NFS enabled. Thus here we have to destroy veip in + * this case. */ - if (env->ve_netns) + if (env->ve_netns || (env->features & VE_FEATURE_NFS)) veip_shutdown(env); env->_venet_dev = NULL;