Re: [PATCH RESEND 1/3] mm/zsmalloc: fix migrate_write_lock() when !CONFIG_COMPACTION

From: Sergey Senozhatsky
Date: Fri Feb 23 2024 - 00:49:34 EST


On (24/02/20 11:36), Chengming Zhou wrote:
> From: Chengming Zhou <zhouchengming@xxxxxxxxxxxxx>
>
> migrate_write_lock() is a empty function when !CONFIG_COMPACTION, in
> which case zs_compact() can be triggered from shrinker reclaim context.
> (Maybe it's better to rename it to zs_shrink()?)
>
> And zspage map object users rely on this migrate_read_lock() so object
> won't be migrated elsewhere.
>
> Fix it by always implementing the migrate_write_lock() related functions.
>
> Signed-off-by: Chengming Zhou <zhouchengming@xxxxxxxxxxxxx>

Reviewed-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx>