diff options
author | Allen Pais <apais@linux.microsoft.com> | 2020-11-03 14:48:17 +0530 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-11-07 10:40:56 -0800 |
commit | c6533ca87a061faac419846d792f6afcec755ffd (patch) | |
tree | 7865b3ce94969310773cdb2db231a1760b3a1433 | |
parent | fccf290f797609c77492b943176e44b883749a6f (diff) | |
download | linux-c6533ca87a061faac419846d792f6afcec755ffd.tar.gz linux-c6533ca87a061faac419846d792f6afcec755ffd.tar.bz2 linux-c6533ca87a061faac419846d792f6afcec755ffd.zip |
net: ipv4: convert tasklets to use new tasklet_setup() API
In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.
Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <apais@linux.microsoft.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | net/ipv4/tcp_output.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 9abf5a0358d5..99905bc01d40 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -1038,9 +1038,9 @@ static void tcp_tsq_handler(struct sock *sk) * transferring tsq->head because tcp_wfree() might * interrupt us (non NAPI drivers) */ -static void tcp_tasklet_func(unsigned long data) +static void tcp_tasklet_func(struct tasklet_struct *t) { - struct tsq_tasklet *tsq = (struct tsq_tasklet *)data; + struct tsq_tasklet *tsq = from_tasklet(tsq, t, tasklet); LIST_HEAD(list); unsigned long flags; struct list_head *q, *n; @@ -1125,9 +1125,7 @@ void __init tcp_tasklet_init(void) struct tsq_tasklet *tsq = &per_cpu(tsq_tasklet, i); INIT_LIST_HEAD(&tsq->head); - tasklet_init(&tsq->tasklet, - tcp_tasklet_func, - (unsigned long)tsq); + tasklet_setup(&tsq->tasklet, tcp_tasklet_func); } } |