Re: [PATCH] block: Set memalloc_noio to false on device_add_disk() error path

From: Christoph Hellwig
Date: Mon Dec 11 2023 - 11:49:23 EST


On Mon, Dec 11, 2023 at 03:53:56PM +0800, linan666@xxxxxxxxxxxxxxx wrote:
> From: Li Nan <linan122@xxxxxxxxxx>
>
> On the error path of device_add_disk(), device's memalloc_noio flag was
> set but not cleared. As the comment of pm_runtime_set_memalloc_noio(),
> "The function should be called between device_add() and device_del()".
> Clear this flag before device_del() now.

Looks good:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>