]> git.baikalelectronics.ru Git - kernel.git/commit
net: minor __dev_alloc_name() optimization
authorEric Dumazet <edumazet@google.com>
Thu, 3 Feb 2022 06:46:09 +0000 (22:46 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 4 Feb 2022 03:11:14 +0000 (19:11 -0800)
commit6dab5e1ffdc6964be250ea3db3d719041b244235
treeece5f3bccf8057178e83959159dc69378eccab46
parent243d6b818855633e7091daf7a2fc857879ce542b
net: minor __dev_alloc_name() optimization

__dev_alloc_name() allocates a private zeroed page,
then sets bits in it while iterating through net devices.

It can use __set_bit() to avoid unnecessary locked operations.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20220203064609.3242863-1-eric.dumazet@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/dev.c