MIPS: bitops: ins start position is always an immediate
[linux-2.6-microblaze.git] / fs / nfsd / export.c
index baa0195..15422c9 100644 (file)
@@ -22,6 +22,7 @@
 #include "nfsfh.h"
 #include "netns.h"
 #include "pnfs.h"
+#include "filecache.h"
 
 #define NFSDDBG_FACILITY       NFSDDBG_EXPORT
 
@@ -232,6 +233,17 @@ static struct cache_head *expkey_alloc(void)
                return NULL;
 }
 
+static void expkey_flush(void)
+{
+       /*
+        * Take the nfsd_mutex here to ensure that the file cache is not
+        * destroyed while we're in the middle of flushing.
+        */
+       mutex_lock(&nfsd_mutex);
+       nfsd_file_cache_purge(current->nsproxy->net_ns);
+       mutex_unlock(&nfsd_mutex);
+}
+
 static const struct cache_detail svc_expkey_cache_template = {
        .owner          = THIS_MODULE,
        .hash_size      = EXPKEY_HASHMAX,
@@ -244,6 +256,7 @@ static const struct cache_detail svc_expkey_cache_template = {
        .init           = expkey_init,
        .update         = expkey_update,
        .alloc          = expkey_alloc,
+       .flush          = expkey_flush,
 };
 
 static int