From: Kaixiong Yu Date: Sat, 11 Jan 2025 07:07:46 +0000 (+0800) Subject: sunrpc: simplify rpcauth_cache_shrink_count() X-Git-Tag: v6.15-rc1~162^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8c3fd194678e99460f22fffa170f7628e3e171c;p=thirdparty%2Fkernel%2Fstable.git sunrpc: simplify rpcauth_cache_shrink_count() It is inappropriate to use sysctl_vfs_cache_pressure here. The sysctl is documented as: This percentage value controls the tendency of the kernel to reclaim the memory which is used for caching of directory and inode objects. So, simplify result of rpcauth_cache_shrink_count() to "return number_cred_unused;". Signed-off-by: Kaixiong Yu Reviewed-by: Kees Cook Acked-by: Anna Schumaker Acked-by: Jeff Layton Reviewed-by: Jeff Layton Signed-off-by: Joel Granados --- diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c index 04534ea537c8f..5a827afd8e3b2 100644 --- a/net/sunrpc/auth.c +++ b/net/sunrpc/auth.c @@ -489,7 +489,7 @@ static unsigned long rpcauth_cache_shrink_count(struct shrinker *shrink, struct shrink_control *sc) { - return number_cred_unused * sysctl_vfs_cache_pressure / 100; + return number_cred_unused; } static void