Thread (30 messages) 30 messages, 7 authors, 2024-12-19

Re: [PATCH v3 -next 11/15] sunrpc: use vfs_pressure_ratio() helper

From: Jeff Layton <jlayton@kernel.org>
Date: 2024-10-10 14:44:11
Also in: linux-fsdevel, linux-mm, linux-nfs, linux-security-module, linux-sh, lkml

On Thu, 2024-10-10 at 23:22 +0800, Kaixiong Yu wrote:
quoted hunk ↗ jump to hunk
Use vfs_pressure_ratio() to simplify code.

Signed-off-by: Kaixiong Yu <redacted>
Reviewed-by: Kees Cook <kees@kernel.org>
Acked-by: Anna Schumaker <redacted>
---
 net/sunrpc/auth.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/sunrpc/auth.c b/net/sunrpc/auth.c
index 04534ea537c8..3d2b51d7e934 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 vfs_pressure_ratio(number_cred_unused);
 }
 
 static void
Acked-by: Jeff Layton <jlayton@kernel.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help