]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
NFSD: Refactor nfsd_file_gc()
authorChuck Lever <chuck.lever@oracle.com>
Fri, 8 Jul 2022 18:24:25 +0000 (14:24 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:19:09 +0000 (16:19 +0200)
[ Upstream commit 3bc6d3470fe412f818f9bff6b71d1be3a76af8f3 ]

Refactor nfsd_file_gc() to use the new list_lru helper.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/filecache.c

index ffe46f3f334950619d699dff83790f72cac6cf73..656c94c7794174be5c80225d74aab9dd9afdb2fb 100644 (file)
@@ -491,7 +491,11 @@ nfsd_file_lru_walk_list(struct shrink_control *sc)
 static void
 nfsd_file_gc(void)
 {
-       nfsd_file_lru_walk_list(NULL);
+       LIST_HEAD(dispose);
+
+       list_lru_walk(&nfsd_file_lru, nfsd_file_lru_cb,
+                     &dispose, LONG_MAX);
+       nfsd_file_gc_dispose_list(&dispose);
 }
 
 static void