Re: [PATCH 2/2] PM/hibernate: remove the bogus call to get_gendisk in software_resume

From: Christoph Hellwig
Date: Sat Sep 26 2020 - 10:05:52 EST


On Fri, Sep 25, 2020 at 08:38:28PM +0200, Pavel Machek wrote:
> > - * name_to_dev_t is ineffective to verify parition if resume_file is in
> > - * integer format. (e.g. major:minor)
> > - */
> > - if (isdigit(resume_file[0]) && resume_wait) {
> > - int partno;
> > - while (!get_gendisk(swsusp_resume_device, &partno))
> > - msleep(10);
> > - }
>
> I believe point of this code was to wait for resume device to appear
> -- see the resume_wait condition. It should not be simply removed.

But get_gendisk has absolutely no relation to a device appearing. So
whatever this code tried to do doesn't make any sense.