diff options
author | Jan Harkes <jaharkes@cs.cmu.edu> | 2005-01-10 17:27:05 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-10 17:27:05 -0800 |
commit | fa34aea6ccc56aea96b2a531436508f2790d17e7 (patch) | |
tree | edd9ec26d39680f230c7821e9705aab1d82a616d /fs | |
parent | 9db7f4514f8075f407c81ee82807b58438e27caf (diff) | |
download | history-fa34aea6ccc56aea96b2a531436508f2790d17e7.tar.gz |
[PATCH] coda: make global code static
The patch below makes some needlessly global code static.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/coda/cnode.c | 2 | ||||
-rw-r--r-- | fs/coda/dir.c | 2 | ||||
-rw-r--r-- | fs/coda/file.c | 2 | ||||
-rw-r--r-- | fs/coda/inode.c | 2 | ||||
-rw-r--r-- | fs/coda/sysctl.c | 56 |
5 files changed, 33 insertions, 31 deletions
diff --git a/fs/coda/cnode.c b/fs/coda/cnode.c index 6bf72ebb1c57af..23aeef5aa8144a 100644 --- a/fs/coda/cnode.c +++ b/fs/coda/cnode.c @@ -11,7 +11,7 @@ #include <linux/coda_fs_i.h> #include <linux/coda_psdev.h> -inline int coda_fideq(struct CodaFid *fid1, struct CodaFid *fid2) +static inline int coda_fideq(struct CodaFid *fid1, struct CodaFid *fid2) { return memcmp(fid1, fid2, sizeof(*fid1)) == 0; } diff --git a/fs/coda/dir.c b/fs/coda/dir.c index 7397d7c93bd4f7..5e84f907cb73bd 100644 --- a/fs/coda/dir.c +++ b/fs/coda/dir.c @@ -55,7 +55,7 @@ int coda_fsync(struct file *, struct dentry *dentry, int datasync); int coda_hasmknod; -struct dentry_operations coda_dentry_operations = +static struct dentry_operations coda_dentry_operations = { .d_revalidate = coda_dentry_revalidate, .d_delete = coda_dentry_delete, diff --git a/fs/coda/file.c b/fs/coda/file.c index 960bda823d5847..e6bc022568f318 100644 --- a/fs/coda/file.c +++ b/fs/coda/file.c @@ -26,7 +26,7 @@ /* if CODA_STORE fails with EOPNOTSUPP, venus clearly doesn't support * CODA_STORE/CODA_RELEASE and we fall back on using the CODA_CLOSE upcall */ -int use_coda_close; +static int use_coda_close; static ssize_t coda_file_read(struct file *coda_file, char __user *buf, size_t count, loff_t *ppos) diff --git a/fs/coda/inode.c b/fs/coda/inode.c index 6a891bfc01dea3..04a73fb4848f44 100644 --- a/fs/coda/inode.c +++ b/fs/coda/inode.c @@ -89,7 +89,7 @@ static int coda_remount(struct super_block *sb, int *flags, char *data) } /* exported operations */ -struct super_operations coda_super_operations = +static struct super_operations coda_super_operations = { .alloc_inode = coda_alloc_inode, .destroy_inode = coda_destroy_inode, diff --git a/fs/coda/sysctl.c b/fs/coda/sysctl.c index 5b71f47e27dd49..f0b10757288f33 100644 --- a/fs/coda/sysctl.c +++ b/fs/coda/sysctl.c @@ -41,35 +41,22 @@ static struct ctl_table_header *fs_table_header; #define CODA_CACHE_INV 9 /* cache invalidation statistics */ #define CODA_FAKE_STATFS 10 /* don't query venus for actual cache usage */ -static ctl_table coda_table[] = { - {CODA_TIMEOUT, "timeout", &coda_timeout, sizeof(int), 0644, NULL, &proc_dointvec}, - {CODA_HARD, "hard", &coda_hard, sizeof(int), 0644, NULL, &proc_dointvec}, - {CODA_VFS, "vfs_stats", NULL, 0, 0644, NULL, &do_reset_coda_vfs_stats}, - {CODA_CACHE_INV, "cache_inv_stats", NULL, 0, 0644, NULL, &do_reset_coda_cache_inv_stats}, - {CODA_FAKE_STATFS, "fake_statfs", &coda_fake_statfs, sizeof(int), 0600, NULL, &proc_dointvec}, - { 0 } -}; - -static ctl_table fs_table[] = { - {FS_CODA, "coda", NULL, 0, 0555, coda_table}, - {0} -}; - struct coda_vfs_stats coda_vfs_stat; -struct coda_cache_inv_stats coda_cache_inv_stat; +static struct coda_cache_inv_stats coda_cache_inv_stat; -void reset_coda_vfs_stats( void ) +static void reset_coda_vfs_stats( void ) { memset( &coda_vfs_stat, 0, sizeof( coda_vfs_stat ) ); } -void reset_coda_cache_inv_stats( void ) +static void reset_coda_cache_inv_stats( void ) { memset( &coda_cache_inv_stat, 0, sizeof( coda_cache_inv_stat ) ); } -int do_reset_coda_vfs_stats( ctl_table * table, int write, struct file * filp, - void __user * buffer, size_t * lenp, loff_t * ppos ) +static int do_reset_coda_vfs_stats( ctl_table * table, int write, + struct file * filp, void __user * buffer, + size_t * lenp, loff_t * ppos ) { if ( write ) { reset_coda_vfs_stats(); @@ -82,9 +69,10 @@ int do_reset_coda_vfs_stats( ctl_table * table, int write, struct file * filp, return 0; } -int do_reset_coda_cache_inv_stats( ctl_table * table, int write, - struct file * filp, void __user * buffer, - size_t * lenp, loff_t * ppos ) +static int do_reset_coda_cache_inv_stats( ctl_table * table, int write, + struct file * filp, + void __user * buffer, + size_t * lenp, loff_t * ppos ) { if ( write ) { reset_coda_cache_inv_stats(); @@ -97,8 +85,8 @@ int do_reset_coda_cache_inv_stats( ctl_table * table, int write, return 0; } -int coda_vfs_stats_get_info( char * buffer, char ** start, off_t offset, - int length) +static int coda_vfs_stats_get_info( char * buffer, char ** start, + off_t offset, int length) { int len=0; off_t begin; @@ -158,8 +146,8 @@ int coda_vfs_stats_get_info( char * buffer, char ** start, off_t offset, return len; } -int coda_cache_inv_stats_get_info( char * buffer, char ** start, off_t offset, - int length) +static int coda_cache_inv_stats_get_info( char * buffer, char ** start, + off_t offset, int length) { int len=0; off_t begin; @@ -196,6 +184,20 @@ int coda_cache_inv_stats_get_info( char * buffer, char ** start, off_t offset, return len; } +static ctl_table coda_table[] = { + {CODA_TIMEOUT, "timeout", &coda_timeout, sizeof(int), 0644, NULL, &proc_dointvec}, + {CODA_HARD, "hard", &coda_hard, sizeof(int), 0644, NULL, &proc_dointvec}, + {CODA_VFS, "vfs_stats", NULL, 0, 0644, NULL, &do_reset_coda_vfs_stats}, + {CODA_CACHE_INV, "cache_inv_stats", NULL, 0, 0644, NULL, &do_reset_coda_cache_inv_stats}, + {CODA_FAKE_STATFS, "fake_statfs", &coda_fake_statfs, sizeof(int), 0600, NULL, &proc_dointvec}, + { 0 } +}; + +static ctl_table fs_table[] = { + {FS_CODA, "coda", NULL, 0, 0555, coda_table}, + {0} +}; + #ifdef CONFIG_PROC_FS @@ -207,7 +209,7 @@ int coda_cache_inv_stats_get_info( char * buffer, char ** start, off_t offset, */ -struct proc_dir_entry* proc_fs_coda; +static struct proc_dir_entry* proc_fs_coda; #endif |