Phonet: remove useless locking in device cleanup
authorremi.denis-courmont@nokia <remi.denis-courmont@nokia>
Fri, 23 Jan 2009 03:00:29 +0000 (03:00 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 27 Jan 2009 05:03:35 +0000 (21:03 -0800)
Incoming packets and sockets are already gone.
The netdevice notifier is unregistered under the RTNL lock
There remains a race with the rtnetlink handlers unregistration, but it
is a generic RTNL issue that was already present before this change.

Signed-off-by: RĂ©mi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/phonet/pn_dev.c

index fd418107652bca5c23790acc8fc44047e954bb85..3e24c0522ee3de41d5a0847f0c5b480193a8e5db 100644 (file)
@@ -204,13 +204,8 @@ void phonet_device_exit(void)
        struct phonet_device *pnd, *n;
 
        rtnl_unregister_all(PF_PHONET);
-       rtnl_lock();
-       spin_lock_bh(&pndevs.lock);
+       unregister_netdevice_notifier(&phonet_device_notifier);
 
        list_for_each_entry_safe(pnd, n, &pndevs.list, list)
                __phonet_device_free(pnd);
-
-       spin_unlock_bh(&pndevs.lock);
-       rtnl_unlock();
-       unregister_netdevice_notifier(&phonet_device_notifier);
 }