Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 193641
b: refs/heads/master
c: 99fe3c3
h: refs/heads/master
i:
  193639: a3e1e9b
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Mar 22, 2010
1 parent e2e5d77 commit 5408841
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ec733b15a3ef0b5759141a177f8044a2f40c41e7
refs/heads/master: 99fe3c391d50d381687fd84ed0ab22d57079e41f
17 changes: 10 additions & 7 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -772,14 +772,17 @@ EXPORT_SYMBOL(__dev_getfirstbyhwtype);

struct net_device *dev_getfirstbyhwtype(struct net *net, unsigned short type)
{
struct net_device *dev;
struct net_device *dev, *ret = NULL;

rtnl_lock();
dev = __dev_getfirstbyhwtype(net, type);
if (dev)
dev_hold(dev);
rtnl_unlock();
return dev;
rcu_read_lock();
for_each_netdev_rcu(net, dev)
if (dev->type == type) {
dev_hold(dev);
ret = dev;
break;
}
rcu_read_unlock();
return ret;
}
EXPORT_SYMBOL(dev_getfirstbyhwtype);

Expand Down

0 comments on commit 5408841

Please sign in to comment.