From patchwork Thu Nov 24 09:10:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li RongQing X-Patchwork-Id: 127458 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id A9EBF1007D7 for ; Thu, 24 Nov 2011 20:11:18 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754286Ab1KXJLM (ORCPT ); Thu, 24 Nov 2011 04:11:12 -0500 Received: from mail-iy0-f174.google.com ([209.85.210.174]:53790 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753949Ab1KXJLJ (ORCPT ); Thu, 24 Nov 2011 04:11:09 -0500 Received: by iage36 with SMTP id e36so2731839iag.19 for ; Thu, 24 Nov 2011 01:11:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:x-mailer; bh=Ii2OtEk/NWXu3Hg5fhNn6CccS4ivcIBb5NNds1Y9mOA=; b=cuFunyC9xJVN+YQHYGVHOj8D99Y9UtOI5VyzuQ/ok5GaWWyLgN6ayLjQpbNPcWWNXe 8dE7Oi16793exnx0Sy9YqNFvkjiMelB8rv7osfjxUZoiIOLBAV2RW47QqQAzm9B9+fsY 4lmQBUJXFOtQ380iLXvo8pwIcHb5RHxeza5x4= Received: by 10.43.43.130 with SMTP id uc2mr6348483icb.35.1322125868458; Thu, 24 Nov 2011 01:11:08 -0800 (PST) Received: from localhost ([61.148.56.138]) by mx.google.com with ESMTPS id bu33sm84638457ibb.11.2011.11.24.01.11.05 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 24 Nov 2011 01:11:07 -0800 (PST) From: roy.qing.li@gmail.com To: netdev@vger.kernel.org Subject: [PATCH] ipv4: remove useless codes in ipmr_device_event() Date: Thu, 24 Nov 2011 17:10:52 +0800 Message-Id: <1322125852-15395-1-git-send-email-roy.qing.li@gmail.com> X-Mailer: git-send-email 1.7.1 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: RongQing.Li Commit 7dc00c82 added a 'notify' parameter for vif_delete() to distinguish whether to unregister the device. When notify=1 means we does not need to unregister the device, so calling unregister_netdevice_many is useless. Signed-off-by: RongQing.Li --- net/ipv4/ipmr.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 76a7f07..8e54490 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c @@ -1520,7 +1520,6 @@ static int ipmr_device_event(struct notifier_block *this, unsigned long event, v struct mr_table *mrt; struct vif_device *v; int ct; - LIST_HEAD(list); if (event != NETDEV_UNREGISTER) return NOTIFY_DONE; @@ -1529,10 +1528,9 @@ static int ipmr_device_event(struct notifier_block *this, unsigned long event, v v = &mrt->vif_table[0]; for (ct = 0; ct < mrt->maxvif; ct++, v++) { if (v->dev == dev) - vif_delete(mrt, ct, 1, &list); + vif_delete(mrt, ct, 1, NULL); } } - unregister_netdevice_many(&list); return NOTIFY_DONE; }