diff options
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 6ba50a1e404..5a13edfc9f7 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1396,7 +1396,7 @@ rollback: | |||
1396 | for_each_net(net) { | 1396 | for_each_net(net) { |
1397 | for_each_netdev(net, dev) { | 1397 | for_each_netdev(net, dev) { |
1398 | if (dev == last) | 1398 | if (dev == last) |
1399 | break; | 1399 | goto outroll; |
1400 | 1400 | ||
1401 | if (dev->flags & IFF_UP) { | 1401 | if (dev->flags & IFF_UP) { |
1402 | nb->notifier_call(nb, NETDEV_GOING_DOWN, dev); | 1402 | nb->notifier_call(nb, NETDEV_GOING_DOWN, dev); |
@@ -1407,6 +1407,7 @@ rollback: | |||
1407 | } | 1407 | } |
1408 | } | 1408 | } |
1409 | 1409 | ||
1410 | outroll: | ||
1410 | raw_notifier_chain_unregister(&netdev_chain, nb); | 1411 | raw_notifier_chain_unregister(&netdev_chain, nb); |
1411 | goto unlock; | 1412 | goto unlock; |
1412 | } | 1413 | } |
@@ -4282,6 +4283,12 @@ static int dev_seq_open(struct inode *inode, struct file *file) | |||
4282 | sizeof(struct dev_iter_state)); | 4283 | sizeof(struct dev_iter_state)); |
4283 | } | 4284 | } |
4284 | 4285 | ||
4286 | int dev_seq_open_ops(struct inode *inode, struct file *file, | ||
4287 | const struct seq_operations *ops) | ||
4288 | { | ||
4289 | return seq_open_net(inode, file, ops, sizeof(struct dev_iter_state)); | ||
4290 | } | ||
4291 | |||
4285 | static const struct file_operations dev_seq_fops = { | 4292 | static const struct file_operations dev_seq_fops = { |
4286 | .owner = THIS_MODULE, | 4293 | .owner = THIS_MODULE, |
4287 | .open = dev_seq_open, | 4294 | .open = dev_seq_open, |