Thread (6 messages) flat view 6 messages, 1 author, 2021-01-19

Re: [PATCH net-next 4/4] net: inline rollback_registered_many()

From: Jakub Kicinski <kuba@kernel.org>
Date: 2021-01-19 19:23:15

On Tue, 19 Jan 2021 11:11:58 -0800 Jakub Kicinski wrote:
quoted hunk ↗ jump to hunk
@@ -10644,15 +10642,6 @@ EXPORT_SYMBOL(unregister_netdevice_queue);
  *  we force a list_del() to make sure stack wont be corrupted later.
  */
 void unregister_netdevice_many(struct list_head *head)
-{
-	if (!list_empty(head)) {
-		rollback_registered_many(head);
-		list_del(head);
Obliviously missed the list_del() here, sorry for the noise :/
quoted hunk ↗ jump to hunk
-	}
-}
-EXPORT_SYMBOL(unregister_netdevice_many);
-
-static void rollback_registered_many(struct list_head *head)
 {
 	struct net_device *dev, *tmp;
 	LIST_HEAD(close_head);
@@ -10660,6 +10649,9 @@ static void rollback_registered_many(struct list_head *head)
 	BUG_ON(dev_boot_phase);
 	ASSERT_RTNL();
 
+	if (list_empty(head))
+		return;
+
 	list_for_each_entry_safe(dev, tmp, head, unreg_list) {
 		/* Some devices call without registering
 		 * for initialization unwind. Remove those
@@ -10744,6 +10736,7 @@ static void rollback_registered_many(struct list_head *head)
 		net_set_todo(dev);
 	}
 }
+EXPORT_SYMBOL(unregister_netdevice_many);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help