[RFC: -mm patch] fs/nfsd/export.c,net/sunrpc/cache.c: make needlessly global code static

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Mar 12, 2006 at 03:10:36AM -0800, Andrew Morton wrote:
>...
> +knfsd-change-the-store-of-auth_domains-to-not-be-a-cache.patch
> +knfsd-change-the-store-of-auth_domains-to-not-be-a-cache-fix.patch
> +knfsd-change-the-store-of-auth_domains-to-not-be-a-cache-fix-2.patch
> +knfsd-change-the-store-of-auth_domains-to-not-be-a-cache-fix-3.patch
> +knfsd-change-the-store-of-auth_domains-to-not-be-a-cache-fix-3-fix.patch
> +knfsd-break-the-hard-linkage-from-svc_expkey-to-svc_export.patch
> +knfsd-get-rid-of-inplace-sunrpc-caches.patch
> +knfsd-create-cache_lookup-function-instead-of-using-a-macro-to-declare-one.patch
> +knfsd-convert-ip_map-cache-to-use-the-new-lookup-routine.patch
> +knfsd-use-new-cache_lookup-for-svc_export.patch
> +knfsd-use-new-cache_lookup-for-svc_expkey-cache.patch
> +knfsd-use-new-sunrpc-cache-for-rsi-cache.patch
> +knfsd-use-new-cache-code-for-rsc-cache.patch
> +knfsd-use-new-cache-code-for-name-id-lookup-caches.patch
> +knfsd-an-assortment-of-little-fixes-to-the-sunrpc-cache-code.patch
> +knfsd-remove-definecachelookup.patch
> +knfsd-unexport-cache_fresh-and-fix-a-small-race.patch
> +knfsd-convert-sunrpc_cache-to-use-krefs.patch
> +knfsd-convert-sunrpc_cache-to-use-krefs-fix.patch
> 
>  knfsd update
>...


We can now make some code static.


Signed-off-by: Adrian Bunk <[email protected]>

---

 fs/nfsd/export.c             |   13 ++++++++-----
 include/linux/nfsd/export.h  |    5 +----
 include/linux/sunrpc/cache.h |    1 -
 net/sunrpc/cache.c           |    2 +-
 net/sunrpc/sunrpc_syms.c     |    1 -
 5 files changed, 10 insertions(+), 12 deletions(-)

--- linux-2.6.16-rc6-mm1-full/include/linux/nfsd/export.h.old	2006-03-13 21:18:50.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/include/linux/nfsd/export.h	2006-03-13 21:20:05.000000000 +0100
@@ -86,9 +86,6 @@
 void			nfsd_export_flush(void);
 void			exp_readlock(void);
 void			exp_readunlock(void);
-struct svc_expkey *	exp_find_key(struct auth_domain *clp, 
-				     int fsid_type, u32 *fsidv,
-				     struct cache_req *reqp);
 struct svc_export *	exp_get_by_name(struct auth_domain *clp,
 					struct vfsmount *mnt,
 					struct dentry *dentry,
@@ -102,7 +99,7 @@
 int			exp_pseudoroot(struct auth_domain *, struct svc_fh *fhp, struct cache_req *creq);
 int			nfserrno(int errno);
 
-extern struct cache_detail svc_export_cache, svc_expkey_cache;
+extern struct cache_detail svc_export_cache;
 
 static inline void exp_put(struct svc_export *exp)
 {
--- linux-2.6.16-rc6-mm1-full/fs/nfsd/export.c.old	2006-03-13 21:19:13.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/fs/nfsd/export.c	2006-03-13 21:25:02.000000000 +0100
@@ -57,7 +57,7 @@
 #define	EXPKEY_HASHMASK		(EXPKEY_HASHMAX -1)
 static struct cache_head *expkey_table[EXPKEY_HASHMAX];
 
-void expkey_put(struct kref *ref)
+static void expkey_put(struct kref *ref)
 {
 	struct svc_expkey *key = container_of(ref, struct svc_expkey, h.ref);
 
@@ -87,6 +87,8 @@
 
 static struct svc_expkey *svc_expkey_update(struct svc_expkey *new, struct svc_expkey *old);
 static struct svc_expkey *svc_expkey_lookup(struct svc_expkey *);
+static struct cache_detail svc_expkey_cache;
+
 static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen)
 {
 	/* client fsidtype fsid [path] */
@@ -255,7 +257,7 @@
 		return NULL;
 }
 
-struct cache_detail svc_expkey_cache = {
+static struct cache_detail svc_expkey_cache = {
 	.owner		= THIS_MODULE,
 	.hash_size	= EXPKEY_HASHMAX,
 	.hash_table	= expkey_table,
@@ -345,7 +347,8 @@
 	(*bpp)[-1] = '\n';
 }
 
-struct svc_export *svc_export_update(struct svc_export *new, struct svc_export *old);
+static struct svc_export *svc_export_update(struct svc_export *new,
+					    struct svc_export *old);
 static struct svc_export *svc_export_lookup(struct svc_export *);
 
 static int check_export(struct inode *inode, int flags)
@@ -574,7 +577,7 @@
 		return NULL;
 }
 
-struct svc_export *
+static struct svc_export *
 svc_export_update(struct svc_export *new, struct svc_export *old)
 {
 	struct cache_head *ch;
@@ -593,7 +596,7 @@
 }
 
 
-struct svc_expkey *
+static struct svc_expkey *
 exp_find_key(svc_client *clp, int fsid_type, u32 *fsidv, struct cache_req *reqp)
 {
 	struct svc_expkey key, *ek;
--- linux-2.6.16-rc6-mm1-full/include/linux/sunrpc/cache.h.old	2006-03-13 21:26:34.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/include/linux/sunrpc/cache.h	2006-03-13 21:26:40.000000000 +0100
@@ -163,7 +163,6 @@
 	kref_put(&h->ref, cd->cache_put);
 }
 
-extern void cache_init(struct cache_head *h);
 extern int cache_check(struct cache_detail *detail,
 		       struct cache_head *h, struct cache_req *rqstp);
 extern void cache_flush(void);
--- linux-2.6.16-rc6-mm1-full/net/sunrpc/cache.c.old	2006-03-13 21:26:55.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/net/sunrpc/cache.c	2006-03-13 21:27:01.000000000 +0100
@@ -37,7 +37,7 @@
 static void cache_defer_req(struct cache_req *req, struct cache_head *item);
 static void cache_revisit_request(struct cache_head *item);
 
-void cache_init(struct cache_head *h)
+static void cache_init(struct cache_head *h)
 {
 	time_t now = get_seconds();
 	h->next = NULL;
--- linux-2.6.16-rc6-mm1-full/net/sunrpc/sunrpc_syms.c.old	2006-03-13 21:27:10.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/net/sunrpc/sunrpc_syms.c	2006-03-13 21:27:13.000000000 +0100
@@ -105,7 +105,6 @@
 EXPORT_SYMBOL(cache_check);
 EXPORT_SYMBOL(cache_flush);
 EXPORT_SYMBOL(cache_purge);
-EXPORT_SYMBOL(cache_init);
 EXPORT_SYMBOL(cache_register);
 EXPORT_SYMBOL(cache_unregister);
 EXPORT_SYMBOL(qword_add);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux