[PATCH] fs/nfsd/export.c,net/sunrpc/cache.c: make needlessly global code static
We can now make some code static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: Neil Brown <neilb@suse.de> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
		
					parent
					
						
							
								baab935ff3
							
						
					
				
			
			
				commit
				
					
						74cae61ab4
					
				
			
		
					 5 changed files with 10 additions and 12 deletions
				
			
		| 
						 | 
					@ -57,7 +57,7 @@ static int		exp_verify_string(char *cp, int max);
 | 
				
			||||||
#define	EXPKEY_HASHMASK		(EXPKEY_HASHMAX -1)
 | 
					#define	EXPKEY_HASHMASK		(EXPKEY_HASHMAX -1)
 | 
				
			||||||
static struct cache_head *expkey_table[EXPKEY_HASHMAX];
 | 
					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);
 | 
						struct svc_expkey *key = container_of(ref, struct svc_expkey, h.ref);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -87,6 +87,8 @@ static void expkey_request(struct cache_detail *cd,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static struct svc_expkey *svc_expkey_update(struct svc_expkey *new, struct svc_expkey *old);
 | 
					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 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)
 | 
					static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	/* client fsidtype fsid [path] */
 | 
						/* client fsidtype fsid [path] */
 | 
				
			||||||
| 
						 | 
					@ -255,7 +257,7 @@ static struct cache_head *expkey_alloc(void)
 | 
				
			||||||
		return NULL;
 | 
							return NULL;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct cache_detail svc_expkey_cache = {
 | 
					static struct cache_detail svc_expkey_cache = {
 | 
				
			||||||
	.owner		= THIS_MODULE,
 | 
						.owner		= THIS_MODULE,
 | 
				
			||||||
	.hash_size	= EXPKEY_HASHMAX,
 | 
						.hash_size	= EXPKEY_HASHMAX,
 | 
				
			||||||
	.hash_table	= expkey_table,
 | 
						.hash_table	= expkey_table,
 | 
				
			||||||
| 
						 | 
					@ -345,7 +347,8 @@ static void svc_export_request(struct cache_detail *cd,
 | 
				
			||||||
	(*bpp)[-1] = '\n';
 | 
						(*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 struct svc_export *svc_export_lookup(struct svc_export *);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int check_export(struct inode *inode, int flags)
 | 
					static int check_export(struct inode *inode, int flags)
 | 
				
			||||||
| 
						 | 
					@ -574,7 +577,7 @@ svc_export_lookup(struct svc_export *exp)
 | 
				
			||||||
		return NULL;
 | 
							return NULL;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct svc_export *
 | 
					static struct svc_export *
 | 
				
			||||||
svc_export_update(struct svc_export *new, struct svc_export *old)
 | 
					svc_export_update(struct svc_export *new, struct svc_export *old)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct cache_head *ch;
 | 
						struct cache_head *ch;
 | 
				
			||||||
| 
						 | 
					@ -593,7 +596,7 @@ svc_export_update(struct svc_export *new, struct svc_export *old)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
struct svc_expkey *
 | 
					static struct svc_expkey *
 | 
				
			||||||
exp_find_key(svc_client *clp, int fsid_type, u32 *fsidv, struct cache_req *reqp)
 | 
					exp_find_key(svc_client *clp, int fsid_type, u32 *fsidv, struct cache_req *reqp)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct svc_expkey key, *ek;
 | 
						struct svc_expkey key, *ek;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -86,9 +86,6 @@ void			nfsd_export_shutdown(void);
 | 
				
			||||||
void			nfsd_export_flush(void);
 | 
					void			nfsd_export_flush(void);
 | 
				
			||||||
void			exp_readlock(void);
 | 
					void			exp_readlock(void);
 | 
				
			||||||
void			exp_readunlock(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 svc_export *	exp_get_by_name(struct auth_domain *clp,
 | 
				
			||||||
					struct vfsmount *mnt,
 | 
										struct vfsmount *mnt,
 | 
				
			||||||
					struct dentry *dentry,
 | 
										struct dentry *dentry,
 | 
				
			||||||
| 
						 | 
					@ -102,7 +99,7 @@ int			exp_rootfh(struct auth_domain *,
 | 
				
			||||||
int			exp_pseudoroot(struct auth_domain *, struct svc_fh *fhp, struct cache_req *creq);
 | 
					int			exp_pseudoroot(struct auth_domain *, struct svc_fh *fhp, struct cache_req *creq);
 | 
				
			||||||
int			nfserrno(int errno);
 | 
					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)
 | 
					static inline void exp_put(struct svc_export *exp)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -163,7 +163,6 @@ static inline void cache_put(struct cache_head *h, struct cache_detail *cd)
 | 
				
			||||||
	kref_put(&h->ref, cd->cache_put);
 | 
						kref_put(&h->ref, cd->cache_put);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extern void cache_init(struct cache_head *h);
 | 
					 | 
				
			||||||
extern int cache_check(struct cache_detail *detail,
 | 
					extern int cache_check(struct cache_detail *detail,
 | 
				
			||||||
		       struct cache_head *h, struct cache_req *rqstp);
 | 
							       struct cache_head *h, struct cache_req *rqstp);
 | 
				
			||||||
extern void cache_flush(void);
 | 
					extern void cache_flush(void);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -37,7 +37,7 @@
 | 
				
			||||||
static void cache_defer_req(struct cache_req *req, struct cache_head *item);
 | 
					static void cache_defer_req(struct cache_req *req, struct cache_head *item);
 | 
				
			||||||
static void cache_revisit_request(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();
 | 
						time_t now = get_seconds();
 | 
				
			||||||
	h->next = NULL;
 | 
						h->next = NULL;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -105,7 +105,6 @@ EXPORT_SYMBOL(auth_unix_lookup);
 | 
				
			||||||
EXPORT_SYMBOL(cache_check);
 | 
					EXPORT_SYMBOL(cache_check);
 | 
				
			||||||
EXPORT_SYMBOL(cache_flush);
 | 
					EXPORT_SYMBOL(cache_flush);
 | 
				
			||||||
EXPORT_SYMBOL(cache_purge);
 | 
					EXPORT_SYMBOL(cache_purge);
 | 
				
			||||||
EXPORT_SYMBOL(cache_init);
 | 
					 | 
				
			||||||
EXPORT_SYMBOL(cache_register);
 | 
					EXPORT_SYMBOL(cache_register);
 | 
				
			||||||
EXPORT_SYMBOL(cache_unregister);
 | 
					EXPORT_SYMBOL(cache_unregister);
 | 
				
			||||||
EXPORT_SYMBOL(qword_add);
 | 
					EXPORT_SYMBOL(qword_add);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue