Commit c6533ca8 authored by Allen Pais's avatar Allen Pais Committed by Jakub Kicinski

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: default avatarRomain Perier <romain.perier@gmail.com>
Signed-off-by: default avatarAllen Pais <apais@linux.microsoft.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent fccf290f
...@@ -1038,9 +1038,9 @@ static void tcp_tsq_handler(struct sock *sk) ...@@ -1038,9 +1038,9 @@ static void tcp_tsq_handler(struct sock *sk)
* transferring tsq->head because tcp_wfree() might * transferring tsq->head because tcp_wfree() might
* interrupt us (non NAPI drivers) * 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); LIST_HEAD(list);
unsigned long flags; unsigned long flags;
struct list_head *q, *n; struct list_head *q, *n;
...@@ -1125,9 +1125,7 @@ void __init tcp_tasklet_init(void) ...@@ -1125,9 +1125,7 @@ void __init tcp_tasklet_init(void)
struct tsq_tasklet *tsq = &per_cpu(tsq_tasklet, i); struct tsq_tasklet *tsq = &per_cpu(tsq_tasklet, i);
INIT_LIST_HEAD(&tsq->head); INIT_LIST_HEAD(&tsq->head);
tasklet_init(&tsq->tasklet, tasklet_setup(&tsq->tasklet, tcp_tasklet_func);
tcp_tasklet_func,
(unsigned long)tsq);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment