Commit 357bdf2a authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds

[PATCH] quota: make some code static

The patch below makes some needlessly global code static.

The most interesting part is that dquot_cachep can become static, since 
it isn't used outside of dquot.c .
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Acked-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6e2c9568
...@@ -128,6 +128,9 @@ static char *quotatypes[] = INITQFNAMES; ...@@ -128,6 +128,9 @@ static char *quotatypes[] = INITQFNAMES;
static struct quota_format_type *quota_formats; /* List of registered formats */ static struct quota_format_type *quota_formats; /* List of registered formats */
static struct quota_module_name module_names[] = INIT_QUOTA_MODULE_NAMES; static struct quota_module_name module_names[] = INIT_QUOTA_MODULE_NAMES;
/* SLAB cache for dquot structures */
static kmem_cache_t *dquot_cachep;
int register_quota_format(struct quota_format_type *fmt) int register_quota_format(struct quota_format_type *fmt)
{ {
spin_lock(&dq_list_lock); spin_lock(&dq_list_lock);
...@@ -199,7 +202,7 @@ static void put_quota_format(struct quota_format_type *fmt) ...@@ -199,7 +202,7 @@ static void put_quota_format(struct quota_format_type *fmt)
static LIST_HEAD(inuse_list); static LIST_HEAD(inuse_list);
static LIST_HEAD(free_dquots); static LIST_HEAD(free_dquots);
unsigned int dq_hash_bits, dq_hash_mask; static unsigned int dq_hash_bits, dq_hash_mask;
static struct hlist_head *dquot_hash; static struct hlist_head *dquot_hash;
struct dqstats dqstats; struct dqstats dqstats;
...@@ -1781,9 +1784,6 @@ static ctl_table sys_table[] = { ...@@ -1781,9 +1784,6 @@ static ctl_table sys_table[] = {
{ .ctl_name = 0 }, { .ctl_name = 0 },
}; };
/* SLAB cache for dquot structures */
kmem_cache_t *dquot_cachep;
static int __init dquot_init(void) static int __init dquot_init(void)
{ {
int i; int i;
......
...@@ -136,7 +136,7 @@ static struct super_block *get_super_to_sync(int type) ...@@ -136,7 +136,7 @@ static struct super_block *get_super_to_sync(int type)
return NULL; return NULL;
} }
void quota_sync_sb(struct super_block *sb, int type) static void quota_sync_sb(struct super_block *sb, int type)
{ {
int cnt; int cnt;
struct inode *discard[MAXQUOTAS]; struct inode *discard[MAXQUOTAS];
......
...@@ -118,7 +118,6 @@ extern kmem_cache_t *mm_cachep; ...@@ -118,7 +118,6 @@ extern kmem_cache_t *mm_cachep;
extern kmem_cache_t *names_cachep; extern kmem_cache_t *names_cachep;
extern kmem_cache_t *files_cachep; extern kmem_cache_t *files_cachep;
extern kmem_cache_t *filp_cachep; extern kmem_cache_t *filp_cachep;
extern kmem_cache_t *dquot_cachep;
extern kmem_cache_t *fs_cachep; extern kmem_cache_t *fs_cachep;
extern kmem_cache_t *signal_cachep; extern kmem_cache_t *signal_cachep;
extern kmem_cache_t *sighand_cachep; extern kmem_cache_t *sighand_cachep;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment