]> git.baikalelectronics.ru Git - kernel.git/commit
net: Queue net_cleanup_work only if there is first net added
authorKirill Tkhai <ktkhai@virtuozzo.com>
Mon, 19 Feb 2018 09:58:54 +0000 (12:58 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Feb 2018 18:23:49 +0000 (13:23 -0500)
commit2ca3aded3bb44d6d0603e51e2c7b3dcbc8712739
tree0ebe27833d80a4162d34b6b46c8bc20db85b9dac
parent1b252fabd59d6bc2fcdaf6a64bd5087ed7ce278a
net: Queue net_cleanup_work only if there is first net added

When llist_add() returns false, cleanup_net() hasn't made its
llist_del_all(), while the work has already been scheduled
by the first queuer. So, we may skip queue_work() in this case.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/net_namespace.c