diff options
author | Breno Leitao <leitao@debian.org> | 2024-08-08 15:25:07 +0300 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-08-13 11:58:58 +0300 |
commit | 1ef33652d22c69a2a7519d003cd6c79b8e514f44 (patch) | |
tree | 9352ab6db6172d36586e4e6a04359096b644e7f9 /include/linux/netpoll.h | |
parent | 2bbf1aedd6650227115edbe2ddd9446b1e8cdc3b (diff) | |
download | linux-1ef33652d22c69a2a7519d003cd6c79b8e514f44.tar.xz |
net: netpoll: extract core of netpoll_cleanup
Extract the core part of netpoll_cleanup(), so, it could be called from
a caller that has the rtnl lock already.
Netconsole uses this in a weird way right now:
__netpoll_cleanup(&nt->np);
spin_lock_irqsave(&target_list_lock, flags);
netdev_put(nt->np.dev, &nt->np.dev_tracker);
nt->np.dev = NULL;
nt->enabled = false;
This will be replaced by do_netpoll_cleanup() as the locking situation
is overhauled.
Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Rik van Riel <riel@surriel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/linux/netpoll.h')
-rw-r--r-- | include/linux/netpoll.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index bd19c4b91e31..cd4e28db0cbd 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h @@ -64,6 +64,7 @@ int netpoll_setup(struct netpoll *np); void __netpoll_cleanup(struct netpoll *np); void __netpoll_free(struct netpoll *np); void netpoll_cleanup(struct netpoll *np); +void do_netpoll_cleanup(struct netpoll *np); netdev_tx_t netpoll_send_skb(struct netpoll *np, struct sk_buff *skb); #ifdef CONFIG_NETPOLL |