Clean up the experimental NFS server replay cache when the module is unloaded.
Reviewed by: rmacklem Approved by: zml (mentor)
This commit is contained in:
parent
7f903d33f0
commit
52776c502b
@ -727,9 +727,8 @@ nfsrc_freecache(struct nfsrvcache *rp)
|
|||||||
newnfsstats.srvcache_size--;
|
newnfsstats.srvcache_size--;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef notdef
|
|
||||||
/*
|
/*
|
||||||
* Clean out the cache. Called when the last nfsd terminates.
|
* Clean out the cache. Called when nfsserver module is unloaded.
|
||||||
*/
|
*/
|
||||||
APPLESTATIC void
|
APPLESTATIC void
|
||||||
nfsrvd_cleancache(void)
|
nfsrvd_cleancache(void)
|
||||||
@ -752,7 +751,6 @@ nfsrvd_cleancache(void)
|
|||||||
nfsrc_tcpsavedreplies = 0;
|
nfsrc_tcpsavedreplies = 0;
|
||||||
NFSUNLOCKCACHE();
|
NFSUNLOCKCACHE();
|
||||||
}
|
}
|
||||||
#endif /* notdef */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The basic rule is to get rid of entries that are expired.
|
* The basic rule is to get rid of entries that are expired.
|
||||||
|
@ -3078,6 +3078,10 @@ nfsd_modevent(module_t mod, int type, void *data)
|
|||||||
#endif
|
#endif
|
||||||
nfsd_call_servertimer = NULL;
|
nfsd_call_servertimer = NULL;
|
||||||
nfsd_call_nfsd = NULL;
|
nfsd_call_nfsd = NULL;
|
||||||
|
|
||||||
|
/* Clean the NFS server reply cache */
|
||||||
|
nfsrvd_cleancache();
|
||||||
|
|
||||||
/* and get rid of the locks */
|
/* and get rid of the locks */
|
||||||
mtx_destroy(&nfs_cache_mutex);
|
mtx_destroy(&nfs_cache_mutex);
|
||||||
mtx_destroy(&nfs_v4root_mutex);
|
mtx_destroy(&nfs_v4root_mutex);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user