diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2009-11-29 22:25:26 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-01 16:15:50 -0800 |
commit | dcbccbd4f1f6ad0f0e169d4b2e816e42bde06f82 (patch) | |
tree | 2a2accb2cedfea63ecaafbe1156fc44b4f2acff1 /include/linux/netdevice.h | |
parent | a5ee155136b4a8f4ab0e4c9c064b661da475e298 (diff) | |
download | kernel_samsung_espresso10-dcbccbd4f1f6ad0f0e169d4b2e816e42bde06f82.zip kernel_samsung_espresso10-dcbccbd4f1f6ad0f0e169d4b2e816e42bde06f82.tar.gz kernel_samsung_espresso10-dcbccbd4f1f6ad0f0e169d4b2e816e42bde06f82.tar.bz2 |
net: Implement for_each_netdev_reverse.
I will need this shortly to implement network namespace shutdown
batching. For sanity sake network devices should be removed in
the reverse order they were created in.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 9428793..daf13d3 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1112,6 +1112,8 @@ extern rwlock_t dev_base_lock; /* Device list lock */ #define for_each_netdev(net, d) \ list_for_each_entry(d, &(net)->dev_base_head, dev_list) +#define for_each_netdev_reverse(net, d) \ + list_for_each_entry_reverse(d, &(net)->dev_base_head, dev_list) #define for_each_netdev_rcu(net, d) \ list_for_each_entry_rcu(d, &(net)->dev_base_head, dev_list) #define for_each_netdev_safe(net, d, n) \ |