NFSD: Refactor nfsd_file_gc()

[ 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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Chuck Lever 2022-07-08 14:24:25 -04:00 committed by Ksawlii
parent 2103e0252c
commit f2f80d62e1

View 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