Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9b7726523523472ead660b1d45df29dcaf6cc5c0
Commit:     9b7726523523472ead660b1d45df29dcaf6cc5c0
Parent:     1c1e87edb9aa38b9e1ae807a6d88fcfd350a55c0
Author:     Pavel Emelyanov <[EMAIL PROTECTED]>
AuthorDate: Wed Oct 10 02:49:09 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 16:55:52 2007 -0700

    [NET]: Remove double dev->flags checking when calling dev_close()
    
    The unregister_netdevice() and dev_change_net_namespace()
    both check for dev->flags to be IFF_UP before calling the
    dev_close(), but the dev_close() checks for IFF_UP itself,
    so remove those unneeded checks.
    
    Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/core/dev.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index e7e728a..1e169a5 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3893,8 +3893,7 @@ void unregister_netdevice(struct net_device *dev)
        BUG_ON(dev->reg_state != NETREG_REGISTERED);
 
        /* If device is running, close it first. */
-       if (dev->flags & IFF_UP)
-               dev_close(dev);
+       dev_close(dev);
 
        /* And unlink it from device chain. */
        unlist_netdevice(dev);
@@ -4018,8 +4017,7 @@ int dev_change_net_namespace(struct net_device *dev, 
struct net *net, const char
         */
 
        /* If device is running close it first. */
-       if (dev->flags & IFF_UP)
-               dev_close(dev);
+       dev_close(dev);
 
        /* And unlink it from device chain */
        err = -ENODEV;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to