/* main.c: AFS client file system
*
- * Copyright (C) 2002,5 Red Hat, Inc. All Rights Reserved.
+ * Copyright (C) 2002 Red Hat, Inc. All Rights Reserved.
* Written by David Howells (dhowells@redhat.com)
*
* This program is free software; you can redistribute it and/or
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/completion.h>
-#include <linux/fscache.h>
#include <rxrpc/rxrpc.h>
#include <rxrpc/transport.h>
#include <rxrpc/call.h>
#include <rxrpc/peer.h>
+#include "cache.h"
#include "cell.h"
#include "server.h"
#include "fsclient.h"
struct list_head afs_cb_hash_tbl[AFS_CB_HASH_COUNT];
DEFINE_SPINLOCK(afs_cb_hash_lock);
-#ifdef CONFIG_AFS_FSCACHE
-static struct fscache_netfs_operations afs_cache_ops = {
+#ifdef AFS_CACHING_SUPPORT
+static struct cachefs_netfs_operations afs_cache_ops = {
+ .get_page_cookie = afs_cache_get_page_cookie,
};
-struct fscache_netfs afs_cache_netfs = {
+struct cachefs_netfs afs_cache_netfs = {
.name = "afs",
.version = 0,
.ops = &afs_cache_ops,
if (ret < 0)
return ret;
-#ifdef CONFIG_AFS_FSCACHE
+#ifdef AFS_CACHING_SUPPORT
/* we want to be able to cache */
- ret = fscache_register_netfs(&afs_cache_netfs);
+ ret = cachefs_register_netfs(&afs_cache_netfs,
+ &afs_cache_cell_index_def);
if (ret < 0)
goto error;
#endif
afs_key_unregister();
error_cache:
#endif
-#ifdef CONFIG_AFS_FSCACHE
- fscache_unregister_netfs(&afs_cache_netfs);
+#ifdef AFS_CACHING_SUPPORT
+ cachefs_unregister_netfs(&afs_cache_netfs);
error:
#endif
afs_cell_purge();
#ifdef CONFIG_KEYS_TURNED_OFF
afs_key_unregister();
#endif
-#ifdef CONFIG_AFS_FSCACHE
- fscache_unregister_netfs(&afs_cache_netfs);
+#ifdef AFS_CACHING_SUPPORT
+ cachefs_unregister_netfs(&afs_cache_netfs);
#endif
afs_proc_cleanup();