Commit c8c3fd19 authored by Kaixiong Yu's avatar Kaixiong Yu Committed by Joel Granados
Browse files

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: default avatarKaixiong Yu <yukaixiong@huawei.com>
Reviewed-by: default avatarKees Cook <kees@kernel.org>
Acked-by: default avatarAnna Schumaker <anna.schumaker@oracle.com>
Acked-by: default avatarJeff Layton <jlayton@kernel.org>
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarJoel Granados <joel.granados@kernel.org>
parent f5d64ae3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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