diff options
Diffstat (limited to 'net/rose/rose_route.c')
-rw-r--r-- | net/rose/rose_route.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/net/rose/rose_route.c b/net/rose/rose_route.c index 9478d9b3d977..d936226916f2 100644 --- a/net/rose/rose_route.c +++ b/net/rose/rose_route.c | |||
@@ -600,13 +600,13 @@ struct net_device *rose_dev_first(void) | |||
600 | { | 600 | { |
601 | struct net_device *dev, *first = NULL; | 601 | struct net_device *dev, *first = NULL; |
602 | 602 | ||
603 | read_lock(&dev_base_lock); | 603 | rcu_read_lock(); |
604 | for_each_netdev(&init_net, dev) { | 604 | for_each_netdev_rcu(&init_net, dev) { |
605 | if ((dev->flags & IFF_UP) && dev->type == ARPHRD_ROSE) | 605 | if ((dev->flags & IFF_UP) && dev->type == ARPHRD_ROSE) |
606 | if (first == NULL || strncmp(dev->name, first->name, 3) < 0) | 606 | if (first == NULL || strncmp(dev->name, first->name, 3) < 0) |
607 | first = dev; | 607 | first = dev; |
608 | } | 608 | } |
609 | read_unlock(&dev_base_lock); | 609 | rcu_read_unlock(); |
610 | 610 | ||
611 | return first; | 611 | return first; |
612 | } | 612 | } |
@@ -618,8 +618,8 @@ struct net_device *rose_dev_get(rose_address *addr) | |||
618 | { | 618 | { |
619 | struct net_device *dev; | 619 | struct net_device *dev; |
620 | 620 | ||
621 | read_lock(&dev_base_lock); | 621 | rcu_read_lock(); |
622 | for_each_netdev(&init_net, dev) { | 622 | for_each_netdev_rcu(&init_net, dev) { |
623 | if ((dev->flags & IFF_UP) && dev->type == ARPHRD_ROSE && rosecmp(addr, (rose_address *)dev->dev_addr) == 0) { | 623 | if ((dev->flags & IFF_UP) && dev->type == ARPHRD_ROSE && rosecmp(addr, (rose_address *)dev->dev_addr) == 0) { |
624 | dev_hold(dev); | 624 | dev_hold(dev); |
625 | goto out; | 625 | goto out; |
@@ -627,7 +627,7 @@ struct net_device *rose_dev_get(rose_address *addr) | |||
627 | } | 627 | } |
628 | dev = NULL; | 628 | dev = NULL; |
629 | out: | 629 | out: |
630 | read_unlock(&dev_base_lock); | 630 | rcu_read_unlock(); |
631 | return dev; | 631 | return dev; |
632 | } | 632 | } |
633 | 633 | ||
@@ -635,14 +635,14 @@ static int rose_dev_exists(rose_address *addr) | |||
635 | { | 635 | { |
636 | struct net_device *dev; | 636 | struct net_device *dev; |
637 | 637 | ||
638 | read_lock(&dev_base_lock); | 638 | rcu_read_lock(); |
639 | for_each_netdev(&init_net, dev) { | 639 | for_each_netdev_rcu(&init_net, dev) { |
640 | if ((dev->flags & IFF_UP) && dev->type == ARPHRD_ROSE && rosecmp(addr, (rose_address *)dev->dev_addr) == 0) | 640 | if ((dev->flags & IFF_UP) && dev->type == ARPHRD_ROSE && rosecmp(addr, (rose_address *)dev->dev_addr) == 0) |
641 | goto out; | 641 | goto out; |
642 | } | 642 | } |
643 | dev = NULL; | 643 | dev = NULL; |
644 | out: | 644 | out: |
645 | read_unlock(&dev_base_lock); | 645 | rcu_read_unlock(); |
646 | return dev != NULL; | 646 | return dev != NULL; |
647 | } | 647 | } |
648 | 648 | ||