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)
commit719c571970109b0d0af24745d31b202affc9365f
treed10efe389dc5db0a16662596bfc79ebd9f34e62a
parent930dfa563155179861470b2aba880eac2ae30bfb
net: make napi_disable() symmetric with enable

Commit 3765996e4f0b ("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