@@ -832,6 +832,8 @@ nfsd_file_cache_shutdown_net(struct net *net)
void
nfsd_file_cache_shutdown(void)
{
+ int i;
+
set_bit(NFSD_FILE_SHUTDOWN, &nfsd_file_lru_flags);
lease_unregister_notifier(&nfsd_file_lease_notifier);
@@ -855,6 +857,15 @@ nfsd_file_cache_shutdown(void)
nfsd_file_hashtbl = NULL;
destroy_workqueue(nfsd_filecache_wq);
nfsd_filecache_wq = NULL;
+
+ for_each_possible_cpu(i) {
+ this_cpu_write(nfsd_file_cache_hits, 0);
+ this_cpu_write(nfsd_file_acquisitions, 0);
+ this_cpu_write(nfsd_file_releases, 0);
+ this_cpu_write(nfsd_file_evictions, 0);
+ this_cpu_write(nfsd_file_pages_flushed, 0);
+ this_cpu_write(nfsd_file_cons_fails, 0);
+ }
}
static bool
If nfsd_file_cache_init() is called after a shutdown, be sure the stat counters are reset. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> --- fs/nfsd/filecache.c | 11 +++++++++++ 1 file changed, 11 insertions(+)