exp_fsid_unhash(unexp);
}
-/*
- * Revoke all exports for a given client.
- */
-static void
-exp_unexport_all(svc_client *clp)
-{
- struct svc_export *exp;
- int index;
-
- dprintk("unexporting all fs's for clnt %p\n", clp);
-
- cache_for_each(exp, &svc_export_cache, index, h)
- if (exp->ex_client == clp)
- exp_do_unexport(exp);
- cache_flush();
-
-}
/*
* unexport syscall.
}
+/*
+ * Flush exports table - called when last nfsd thread is killed
+ */
+void
+nfsd_export_flush(void)
+{
+ exp_writelock();
+ cache_purge(&svc_expkey_cache);
+ cache_purge(&svc_export_cache);
+ exp_writeunlock();
+}
+
/*
* Shutdown the exports module.
*/
exp_writelock();
- exp_unexport_all(NULL);
-
if (cache_unregister(&svc_expkey_cache))
printk(KERN_ERR "nfsd: failed to unregister expkey cache\n");
if (cache_unregister(&svc_export_cache))
printk(KERN_WARNING "nfsd: last server has exited\n");
if (err != SIG_NOCLEAN) {
printk(KERN_WARNING "nfsd: unexporting all filesystems\n");
- nfsd_export_shutdown();
+ nfsd_export_flush();
}
nfsd_serv = NULL;
nfsd_racache_shutdown(); /* release read-ahead cache */
*/
void nfsd_export_init(void);
void nfsd_export_shutdown(void);
+void nfsd_export_flush(void);
void exp_readlock(void);
void exp_readunlock(void);
struct svc_expkey * exp_find_key(struct auth_domain *clp,
EXPORT_SYMBOL(cache_check);
EXPORT_SYMBOL(cache_clean);
EXPORT_SYMBOL(cache_flush);
+EXPORT_SYMBOL(cache_purge);
EXPORT_SYMBOL(cache_fresh);
EXPORT_SYMBOL(cache_init);
EXPORT_SYMBOL(cache_register);