Re: [PATCH] Fix writing maj:min to /sys/power/resume (fixes hiberation with systemd)

From: Christoph Hellwig
Date: Tue Jul 11 2023 - 08:08:12 EST


On Tue, Jul 11, 2023 at 01:48:12PM +0200, Azat Khuzhin wrote:
> resume_store() first calls lookup_bdev() and after tries to handle
> maj:min, but it does not reset the error before, hence if you will write
> maj:min you will get ENOENT:
>
> # echo 259:2 >| /sys/power/resume
> bash: echo: write error: No such file or directory
>
> This also should fix hiberation via systemd, since it uses this way.

Looks good:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>