Skip to content

Commit 6958c97

Browse files
jpirkodavem330
authored andcommitted
net: procfs: use index hashlist instead of name hashlist
Name hashlist is going to be used for more than just dev->name, so use rather index hashlist for iteration over net_device instances. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent be2644a commit 6958c97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/core/net-procfs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ static inline struct net_device *dev_from_same_bucket(struct seq_file *seq, loff
2020
struct hlist_head *h;
2121
unsigned int count = 0, offset = get_offset(*pos);
2222

23-
h = &net->dev_name_head[get_bucket(*pos)];
24-
hlist_for_each_entry_rcu(dev, h, name_hlist) {
23+
h = &net->dev_index_head[get_bucket(*pos)];
24+
hlist_for_each_entry_rcu(dev, h, index_hlist) {
2525
if (++count == offset)
2626
return dev;
2727
}

0 commit comments

Comments
 (0)