[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>
This commit is contained in:
Stephen Hemminger
2006-03-20 22:23:58 -08:00
committed by David S. Miller
parent 253aa11578
commit 6756ae4b4e
8 changed files with 51 additions and 51 deletions

View File

@ -2466,9 +2466,9 @@ int dev_ioctl(unsigned int cmd, void __user *arg)
*/
if (cmd == SIOCGIFCONF) {
rtnl_shlock();
rtnl_lock();
ret = dev_ifconf((char __user *) arg);
rtnl_shunlock();
rtnl_unlock();
return ret;
}
if (cmd == SIOCGIFNAME)
@ -2877,7 +2877,7 @@ static void netdev_wait_allrefs(struct net_device *dev)
rebroadcast_time = warning_time = jiffies;
while (atomic_read(&dev->refcnt) != 0) {
if (time_after(jiffies, rebroadcast_time + 1 * HZ)) {
rtnl_shlock();
rtnl_lock();
/* Rebroadcast unregister notification */
notifier_call_chain(&netdev_chain,
@ -2894,7 +2894,7 @@ static void netdev_wait_allrefs(struct net_device *dev)
linkwatch_run_queue();
}
rtnl_shunlock();
__rtnl_unlock();
rebroadcast_time = jiffies;
}