]> git.baikalelectronics.ru Git - kernel.git/commit
net: make napi_disable() symmetric with enable
authorJakub Kicinski <kuba@kernel.org>
Fri, 24 Sep 2021 20:24:53 +0000 (13:24 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 27 Sep 2021 11:19:11 +0000 (12:19 +0100)
commited349d4b62ca0c397710cdc43e462d2ea38a0752
treed10efe389dc5db0a16662596bfc79ebd9f34e62a
parentf46cc137b78d5b1ac3f959cd52455626f62ffc0e
net: make napi_disable() symmetric with enable

Commit 82372eafe6cc ("napi: fix race inside napi_enable") fixed
an ordering bug in napi_enable() and made the napi_enable() diverge
from napi_disable(). The state transitions done on disable are
not symmetric to enable.

There is no known bug in napi_disable() this is just refactoring.

Eric suggests we can also replace msleep(1) with a more opportunistic
usleep_range().

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c