[PATCH 2/4] net ipv4: Remove unnecessary test for the loopback device from inetdev_destroy

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric W. Biederman
Date: Wednesday, September 26, 2007 - 4:55 pm

Currently we never call unregister_netdev for the loopback device so
it is impossible for us to reach inetdev_destroy with the loopback
device.  So the test in inetdev_destroy is unnecessary.

Further when testing with my network namespace patches removing
unregistering the loopback device and calling inetdev_destroy works
fine so there appears to be no reason for avoiding unregistering the
loopback device.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
 net/ipv4/devinet.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index affea9b..e7f2b02 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -203,8 +203,6 @@ static void inetdev_destroy(struct in_device *in_dev)
 	ASSERT_RTNL();
 
 	dev = in_dev->dev;
-	if (dev == loopback_dev)
-		return;
 
 	in_dev->dead = 1;
 
-- 
1.5.3.rc6.17.g1911

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/4] net: Dynamically allocate the per cpu counters ..., Eric W. Biederman, (Wed Sep 26, 4:53 pm)
[PATCH 2/4] net ipv4: Remove unnecessary test for the loop ..., Eric W. Biederman, (Wed Sep 26, 4:55 pm)
[PATCH 3/4] net ipv4: When possible test for IFF_LOOPBACK ..., Eric W. Biederman, (Wed Sep 26, 4:58 pm)
[PATCH 4/4] net: Make the loopback device per network name ..., Eric W. Biederman, (Wed Sep 26, 5:00 pm)
Re: [PATCH 1/4] net: Dynamically allocate the per cpu coun ..., Eric W. Biederman, (Thu Sep 27, 12:48 am)
Re: [PATCH 3/4] net ipv4: When possible test for IFF_LOOPB ..., Eric W. Biederman, (Thu Sep 27, 9:10 am)
Re: [Devel] [PATCH 4/4] net: Make the loopback device per ..., Eric W. Biederman, (Thu Sep 27, 9:48 am)
Re: [PATCH 1/4] net: Dynamically allocate the per cpu coun ..., Eric W. Biederman, (Thu Sep 27, 1:44 pm)