mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
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>
This commit is contained in:
parent
f5d64ae331
commit
c8c3fd1946
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user