aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-03-21 01:23:58 -0500
committerDavid S. Miller <davem@davemloft.net>2006-03-21 01:23:58 -0500
commit6756ae4b4e97aba48c042b4aa6b77a18f507d2cb (patch)
tree05bf37711d782fb0089d474716026c44a454f89b /net/core/dev.c
parent253aa11578c1b89757282430891bb66ae5300092 (diff)
[NET]: Convert RTNL to mutex.
This patch turns the RTNL from a semaphore to a new 2.6.16 mutex and gets rid of some of the leftover legacy. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 8763c99fcb84..be1d896cc5b9 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2466,9 +2466,9 @@ int dev_ioctl(unsigned int cmd, void __user *arg)
2466 */ 2466 */
2467 2467
2468 if (cmd == SIOCGIFCONF) { 2468 if (cmd == SIOCGIFCONF) {
2469 rtnl_shlock(); 2469 rtnl_lock();
2470 ret = dev_ifconf((char __user *) arg); 2470 ret = dev_ifconf((char __user *) arg);
2471 rtnl_shunlock(); 2471 rtnl_unlock();
2472 return ret; 2472 return ret;
2473 } 2473 }
2474 if (cmd == SIOCGIFNAME) 2474 if (cmd == SIOCGIFNAME)
@@ -2877,7 +2877,7 @@ static void netdev_wait_allrefs(struct net_device *dev)
2877 rebroadcast_time = warning_time = jiffies; 2877 rebroadcast_time = warning_time = jiffies;
2878 while (atomic_read(&dev->refcnt) != 0) { 2878 while (atomic_read(&dev->refcnt) != 0) {
2879 if (time_after(jiffies, rebroadcast_time + 1 * HZ)) { 2879 if (time_after(jiffies, rebroadcast_time + 1 * HZ)) {
2880 rtnl_shlock(); 2880 rtnl_lock();
2881 2881
2882 /* Rebroadcast unregister notification */ 2882 /* Rebroadcast unregister notification */
2883 notifier_call_chain(&netdev_chain, 2883 notifier_call_chain(&netdev_chain,
@@ -2894,7 +2894,7 @@ static void netdev_wait_allrefs(struct net_device *dev)
2894 linkwatch_run_queue(); 2894 linkwatch_run_queue();
2895 } 2895 }
2896 2896
2897 rtnl_shunlock(); 2897 __rtnl_unlock();
2898 2898
2899 rebroadcast_time = jiffies; 2899 rebroadcast_time = jiffies;
2900 } 2900 }