[Top] [All Lists]

[PATCH] remove dev_get from wanrouter

To: Nenad Corbic <ncorbic@xxxxxxxxxxx>
Subject: [PATCH] remove dev_get from wanrouter
From: Stephen Hemminger <shemminger@xxxxxxxx>
Date: Mon, 29 Sep 2003 14:36:03 -0700
Cc: Jeff Garzik <jgarzik@xxxxxxxxx>, netdev@xxxxxxxxxxx
Organization: Open Source Development Lab
Sender: netdev-bounce@xxxxxxxxxxx
The call to dev_get() in wanrouter_device_new_if is racy and redundant and 
be removed.  The later 'register_netdev()' does the same test internally and 
return the appropriate error if the name already exists.

This patch is against 2.6.0-test6.
Resend of earlier patch because it was ignored, or missed.

diff -urN -X dontdiff linux-2.5/net/wanrouter/wanmain.c 
--- linux-2.5/net/wanrouter/wanmain.c   2003-09-22 10:21:35.000000000 -0700
+++ linux-2.5-net/net/wanrouter/wanmain.c       2003-09-22 10:49:29.000000000 
@@ -726,8 +726,6 @@
                if (dev->name == NULL) {
                        err = -EINVAL;
-               } else if (dev_get(dev->name)) {
-                       err = -EEXIST;  /* name already exists */
                } else {
                        #ifdef WANDEBUG

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] remove dev_get from wanrouter, Stephen Hemminger <=