Re: [PATCH v2] erofs(shrinker): return SHRINK_EMPTY if no objects to free

From: Gao Xiang
Date: Thu Jan 16 2025 - 03:46:08 EST




On 2025/1/16 16:33, Chen Linxuan wrote:
Comments in file include/linux/shrinker.h says that
`count_objects` of `struct shrinker` should return SHRINK_EMPTY
when there are no objects to free.

If there are no objects to free, it should return SHRINK_EMPTY,
while 0 is returned in cases of the number of freeable items cannot
be determined or shrinker should skip this cache for this time
(e.g., their number is below shrinkable limit).

Signed-off-by: Chen Linxuan <chenlinxuan@xxxxxxxxxxxxx>

Reviewed-by: Gao Xiang <hsiangkao@xxxxxxxxxxxxxxxxx>

Thanks,
Gao Xiang