lkml.org 
[lkml]   [2022]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3 2/2] tracing: make tracer_init_tracefs initcall asynchronous
Date

> > +static __init int tracer_init_tracefs(void)
> > +{
> > + int ret;
> > +
> > + trace_access_lock_init();
> > +
> > + ret = tracing_init_dentry();
> > + if (ret)
> > + return 0;
> > +
> > + INIT_WORK(&tracerfs_init_work, tracer_init_tracefs_work_func);
> > + if (!eval_map_wq)
> > + tracer_init_tracefs_work_func(&tracerfs_init_work);
>
> Why go through the bother of doing the INIT_WORK if eval_map_wq is not
> created? Just do:
>
> if (eval_map_wq) {
> INIT_WORK(&tracerfs_init_work, tracer_init_tracefs_work_func);
> queue_work(eval_map_wq, &tracerfs_init_work);
> } else {
> tracer_init_tracefs_work_func(NULL);
> }

Got it, I will update it in v4.
Thanks!

>
> But that's just a nit anyway.
>
> -- Steve
>
>
>
> > + else
> > + queue_work(eval_map_wq, &tracerfs_init_work);
> >
> > return 0;
> > }

\
 
 \ /
  Last update: 2022-04-26 10:07    [W:0.042 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site