]> www.infradead.org Git - users/dwmw2/linux.git/commit
f2fs: fix to return SHRINK_EMPTY if no objects to free
authorZhiguo Niu <zhiguo.niu@unisoc.com>
Mon, 10 Feb 2025 01:24:09 +0000 (09:24 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 10 Feb 2025 17:03:19 +0000 (17:03 +0000)
commitbd409934c0619a6c3507891844aeb0c0dca69e18
tree0308b0cd7b49ea838ad2c18fe2f06b6830c5060d
parenteb85c2410d6f581e957cd03a644ff6ddbe592af9
f2fs: fix to return SHRINK_EMPTY if no objects to free

Quoted from include/linux/shrinker.h
"count_objects should return the number of freeable items in the cache. 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: Zhiguo Niu <zhiguo.niu@unisoc.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/shrinker.c