X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fafs%2Fmain.c;h=913c689bdb357d3a8550ab573cd4a69386820575;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=5840bb2295ca74a7fcad7be23cf1751cac706cf6;hpb=41689045f6a3cbe0550e1d34e9cc20d2e8c432ba;p=linux-2.6.git diff --git a/fs/afs/main.c b/fs/afs/main.c index 5840bb229..913c689bd 100644 --- a/fs/afs/main.c +++ b/fs/afs/main.c @@ -1,6 +1,6 @@ /* 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 @@ -14,11 +14,11 @@ #include #include #include -#include #include #include #include #include +#include "cache.h" #include "cell.h" #include "server.h" #include "fsclient.h" @@ -51,11 +51,12 @@ static struct rxrpc_peer_ops afs_peer_ops = { 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, @@ -82,9 +83,10 @@ static int __init afs_init(void) 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 @@ -135,8 +137,8 @@ static int __init afs_init(void) 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(); @@ -165,8 +167,8 @@ static void __exit afs_exit(void) #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();