Re: [PATCH] block/rnbd-clt: Avoid flush_workqueue(system_long_wq) usage

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

 



On Wed, Apr 13, 2022 at 2:26 PM Tetsuo Handa
<penguin-kernel@xxxxxxxxxxxxxxxxxxx> wrote:
>
> Thanks for a patch.
>
> On 2022/04/13 21:13, Jack Wang wrote:
> > @@ -1792,6 +1793,13 @@ static int __init rnbd_client_init(void)
> >                      err);
> >               unregister_blkdev(rnbd_client_major, "rnbd");
>
> I think you want
>
>                 return err;
>
> here so that alloc_workqueue() won't be called when
> rnbd_clt_create_sysfs_files() returned an error.
right, I just fixed it, and sent new version.
>
> >       }
> > +     rnbd_clt_wq = alloc_workqueue("rnbd_clt_wq", 0, 0);
> > +     if (!rnbd_clt_wq) {
> > +             pr_err("Failed to load module, alloc_workqueue failed.\n");
> > +             rnbd_clt_destroy_sysfs_files();
> > +             unregister_blkdev(rnbd_client_major, "rnbd");
> > +             err = -ENOMEM;
> > +     }
> >
> >       return err;
> >  }



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux