|
@@ -7196,11 +7196,10 @@ static void __net_exit rtnl_lock_unregistering(struct list_head *net_list)
|
|
|
*/
|
|
|
struct net *net;
|
|
|
bool unregistering;
|
|
|
- DEFINE_WAIT(wait);
|
|
|
+ DEFINE_WAIT_FUNC(wait, woken_wake_function);
|
|
|
|
|
|
+ add_wait_queue(&netdev_unregistering_wq, &wait);
|
|
|
for (;;) {
|
|
|
- prepare_to_wait(&netdev_unregistering_wq, &wait,
|
|
|
- TASK_UNINTERRUPTIBLE);
|
|
|
unregistering = false;
|
|
|
rtnl_lock();
|
|
|
list_for_each_entry(net, net_list, exit_list) {
|
|
@@ -7212,9 +7211,10 @@ static void __net_exit rtnl_lock_unregistering(struct list_head *net_list)
|
|
|
if (!unregistering)
|
|
|
break;
|
|
|
__rtnl_unlock();
|
|
|
- schedule();
|
|
|
+
|
|
|
+ wait_woken(&wait, TASK_UNINTERRUPTIBLE, MAX_SCHEDULE_TIMEOUT);
|
|
|
}
|
|
|
- finish_wait(&netdev_unregistering_wq, &wait);
|
|
|
+ remove_wait_queue(&netdev_unregistering_wq, &wait);
|
|
|
}
|
|
|
|
|
|
static void __net_exit default_device_exit_batch(struct list_head *net_list)
|