Re: Qestion about device link

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 12, 2021 at 8:38 AM Hillf Danton <hdanton@xxxxxxxx> wrote:
>
> On Tue, 11 May 2021 21:43:40 Rafael J. Wysocki  wrote:
> > >  #ifdef CONFIG_SRCU
> > > +static void __device_link_free_fn(struct work_struct *work)
> > > +{
> > > +       device_link_free(container_of(work, struct device_link, srcu.work));
> > > +}
> > > +
> > >  static void __device_link_free_srcu(struct rcu_head *rhead)
> > >  {
> > > -       device_link_free(container_of(rhead, struct device_link, rcu_head));
> > > +       struct device_link *link = container_of(rhead, struct device_link,
> > > +                                               srcu.rhead);
> > > +       struct work_struct *work = &link->srcu.work;
> > > +
> > > +       /*
> > > +        * Because device_link_free() may sleep in some cases, schedule the
> > > +        * execution of it instead of invoking it directly.
> > > +        */
> > > +       INIT_WORK(work, __device_link_free_fn);
> > > +       schedule_work(work);
> > >  }
>
> Nope, you need something like queue_work(system_unbound_wq, work); instead
> because of the blocking wq callback.

system_long_wq rather, as it really doesn't matter when it gets completed.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux