From: Adrian Bunk <bunk@stusta.de>

This patch contains the following cleanups:
- make needlessly global code static
- main.c: remove the unused global variable fscache_debug

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 fs/fscache/cookie.c      |   19 +++++++++++++++----
 fs/fscache/fscache-int.h |   11 -----------
 fs/fscache/main.c        |    2 --
 3 files changed, 15 insertions(+), 17 deletions(-)

diff -puN fs/fscache/cookie.c~split-general-cache-manager-from-cachefs-fs-fscache-cleanups fs/fscache/cookie.c
--- devel/fs/fscache/cookie.c~split-general-cache-manager-from-cachefs-fs-fscache-cleanups	2005-07-27 13:40:07.000000000 -0700
+++ devel-akpm/fs/fscache/cookie.c	2005-07-27 13:40:07.000000000 -0700
@@ -12,14 +12,25 @@
 #include <linux/module.h>
 #include "fscache-int.h"
 
-LIST_HEAD(fscache_netfs_list);
-LIST_HEAD(fscache_cache_list);
-DECLARE_RWSEM(fscache_addremove_sem);
+static LIST_HEAD(fscache_netfs_list);
+static LIST_HEAD(fscache_cache_list);
+static DECLARE_RWSEM(fscache_addremove_sem);
 
 kmem_cache_t *fscache_cookie_jar;
 
 static void fscache_withdraw_node(struct fscache_cache *cache,
 				  struct fscache_node *node);
+static void __fscache_cookie_put(struct fscache_cookie *cookie);
+
+
+static inline void fscache_cookie_put(struct fscache_cookie *cookie)
+{
+	BUG_ON(atomic_read(&cookie->usage) <= 0);
+
+	if (atomic_dec_and_test(&cookie->usage))
+		__fscache_cookie_put(cookie);
+
+}
 
 /*****************************************************************************/
 /*
@@ -928,7 +939,7 @@ EXPORT_SYMBOL(__fscache_update_cookie);
 /*
  * destroy a cookie
  */
-void __fscache_cookie_put(struct fscache_cookie *cookie)
+static void __fscache_cookie_put(struct fscache_cookie *cookie)
 {
 	struct fscache_search_result *srch;
 
diff -puN fs/fscache/fscache-int.h~split-general-cache-manager-from-cachefs-fs-fscache-cleanups fs/fscache/fscache-int.h
--- devel/fs/fscache/fscache-int.h~split-general-cache-manager-from-cachefs-fs-fscache-cleanups	2005-07-27 13:40:07.000000000 -0700
+++ devel-akpm/fs/fscache/fscache-int.h	2005-07-27 13:40:07.000000000 -0700
@@ -22,17 +22,6 @@ extern struct fscache_cookie fscache_fsd
 
 extern void fscache_cookie_init_once(void *_cookie, kmem_cache_t *cachep, unsigned long flags);
 
-extern void __fscache_cookie_put(struct fscache_cookie *cookie);
-
-static inline void fscache_cookie_put(struct fscache_cookie *cookie)
-{
-	BUG_ON(atomic_read(&cookie->usage) <= 0);
-
-	if (atomic_dec_and_test(&cookie->usage))
-		__fscache_cookie_put(cookie);
-
-}
-
 /*****************************************************************************/
 /*
  * debug tracing
diff -puN fs/fscache/main.c~split-general-cache-manager-from-cachefs-fs-fscache-cleanups fs/fscache/main.c
--- devel/fs/fscache/main.c~split-general-cache-manager-from-cachefs-fs-fscache-cleanups	2005-07-27 13:40:07.000000000 -0700
+++ devel-akpm/fs/fscache/main.c	2005-07-27 13:40:07.000000000 -0700
@@ -16,8 +16,6 @@
 #include <linux/slab.h>
 #include "fscache-int.h"
 
-int fscache_debug = 0;
-
 static int fscache_init(void);
 static void fscache_exit(void);
 
_