summaryrefslogtreecommitdiff
path: root/net/sunrpc
diff options
context:
space:
mode:
authorKaixiong Yu <yukaixiong@huawei.com>2025-01-11 15:07:46 +0800
committerJoel Granados <joel.granados@kernel.org>2025-02-07 16:53:04 +0100
commitc8c3fd194678e99460f22fffa170f7628e3e171c (patch)
tree87cb96f137ff3c3d8fac802cd8d7571273b8aff5 /net/sunrpc
parentf5d64ae331d00c27cc6fc615811a9ba13de5fb0e (diff)
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 <yukaixiong@huawei.com> Reviewed-by: Kees Cook <kees@kernel.org> Acked-by: Anna Schumaker <anna.schumaker@oracle.com> Acked-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Joel Granados <joel.granados@kernel.org>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/auth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c
index 04534ea537c8..5a827afd8e3b 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