aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2005-05-05 19:16:09 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-05 19:36:47 -0400
commit75c96f85845a6707b0f9916cb263cb3584f7d48f (patch)
tree45a64d1c9bb71d7093db3a11e0f21465c2e3dec6 /fs
parent5e198d94dd0c3ec7f6138229e2e412c2c6268c38 (diff)
[PATCH] make some things static
This patch makes some needlessly global identifiers static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Arjan van de Ven <arjanv@infradead.org> Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/bad_inode.c2
-rw-r--r--fs/buffer.c2
-rw-r--r--fs/char_dev.c2
-rw-r--r--fs/dcache.c2
-rw-r--r--fs/eventpoll.c2
-rw-r--r--fs/exec.c3
-rw-r--r--fs/jffs2/compr_rubin.c18
-rw-r--r--fs/jffs2/compr_zlib.c12
-rw-r--r--fs/locks.c6
-rw-r--r--fs/mbcache.c2
-rw-r--r--fs/mpage.c2
-rw-r--r--fs/namei.c8
-rw-r--r--fs/nfs/idmap.c4
-rw-r--r--fs/nfs/inode.c4
-rw-r--r--fs/nls/nls_base.c2
-rw-r--r--fs/select.c6
16 files changed, 45 insertions, 32 deletions
diff --git a/fs/bad_inode.c b/fs/bad_inode.c
index 672a31924f3c..e172180a1d8c 100644
--- a/fs/bad_inode.c
+++ b/fs/bad_inode.c
@@ -47,7 +47,7 @@ static struct file_operations bad_file_ops =
47 .get_unmapped_area = EIO_ERROR, 47 .get_unmapped_area = EIO_ERROR,
48}; 48};
49 49
50struct inode_operations bad_inode_ops = 50static struct inode_operations bad_inode_ops =
51{ 51{
52 .create = EIO_ERROR, 52 .create = EIO_ERROR,
53 .lookup = EIO_ERROR, 53 .lookup = EIO_ERROR,
diff --git a/fs/buffer.c b/fs/buffer.c
index 91ace8034bf7..6f88dcc6d002 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -1210,7 +1210,7 @@ grow_buffers(struct block_device *bdev, sector_t block, int size)
1210 return 1; 1210 return 1;
1211} 1211}
1212 1212
1213struct buffer_head * 1213static struct buffer_head *
1214__getblk_slow(struct block_device *bdev, sector_t block, int size) 1214__getblk_slow(struct block_device *bdev, sector_t block, int size)
1215{ 1215{
1216 /* Size must be multiple of hard sectorsize */ 1216 /* Size must be multiple of hard sectorsize */
diff --git a/fs/char_dev.c b/fs/char_dev.c
index a745b1d9e545..c1e3537909fc 100644
--- a/fs/char_dev.c
+++ b/fs/char_dev.c
@@ -328,7 +328,7 @@ void cd_forget(struct inode *inode)
328 spin_unlock(&cdev_lock); 328 spin_unlock(&cdev_lock);
329} 329}
330 330
331void cdev_purge(struct cdev *cdev) 331static void cdev_purge(struct cdev *cdev)
332{ 332{
333 spin_lock(&cdev_lock); 333 spin_lock(&cdev_lock);
334 while (!list_empty(&cdev->list)) { 334 while (!list_empty(&cdev->list)) {
diff --git a/fs/dcache.c b/fs/dcache.c
index 496a4e08369c..3aa8a7e980d8 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -39,7 +39,7 @@ int sysctl_vfs_cache_pressure = 100;
39EXPORT_SYMBOL_GPL(sysctl_vfs_cache_pressure); 39EXPORT_SYMBOL_GPL(sysctl_vfs_cache_pressure);
40 40
41 __cacheline_aligned_in_smp DEFINE_SPINLOCK(dcache_lock); 41 __cacheline_aligned_in_smp DEFINE_SPINLOCK(dcache_lock);
42seqlock_t rename_lock __cacheline_aligned_in_smp = SEQLOCK_UNLOCKED; 42static seqlock_t rename_lock __cacheline_aligned_in_smp = SEQLOCK_UNLOCKED;
43 43
44EXPORT_SYMBOL(dcache_lock); 44EXPORT_SYMBOL(dcache_lock);
45 45
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 05b966cd6f76..9900e333655a 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -320,7 +320,7 @@ static struct super_block *eventpollfs_get_sb(struct file_system_type *fs_type,
320/* 320/*
321 * This semaphore is used to serialize ep_free() and eventpoll_release_file(). 321 * This semaphore is used to serialize ep_free() and eventpoll_release_file().
322 */ 322 */
323struct semaphore epsem; 323static struct semaphore epsem;
324 324
325/* Safe wake up implementation */ 325/* Safe wake up implementation */
326static struct poll_safewake psw; 326static struct poll_safewake psw;
diff --git a/fs/exec.c b/fs/exec.c
index a8394499926c..52acff3f44f0 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -197,7 +197,8 @@ static int count(char __user * __user * argv, int max)
197 * memory to free pages in kernel mem. These are in a format ready 197 * memory to free pages in kernel mem. These are in a format ready
198 * to be put directly into the top of new user memory. 198 * to be put directly into the top of new user memory.
199 */ 199 */
200int copy_strings(int argc,char __user * __user * argv, struct linux_binprm *bprm) 200static int copy_strings(int argc, char __user * __user * argv,
201 struct linux_binprm *bprm)
201{ 202{
202 struct page *kmapped_page = NULL; 203 struct page *kmapped_page = NULL;
203 char *kaddr = NULL; 204 char *kaddr = NULL;
diff --git a/fs/jffs2/compr_rubin.c b/fs/jffs2/compr_rubin.c
index 450d6624181f..09422388fb96 100644
--- a/fs/jffs2/compr_rubin.c
+++ b/fs/jffs2/compr_rubin.c
@@ -228,8 +228,10 @@ int jffs2_rubinmips_compress(unsigned char *data_in, unsigned char *cpage_out,
228 return rubin_do_compress(BIT_DIVIDER_MIPS, bits_mips, data_in, cpage_out, sourcelen, dstlen); 228 return rubin_do_compress(BIT_DIVIDER_MIPS, bits_mips, data_in, cpage_out, sourcelen, dstlen);
229} 229}
230#endif 230#endif
231int jffs2_dynrubin_compress(unsigned char *data_in, unsigned char *cpage_out, 231static int jffs2_dynrubin_compress(unsigned char *data_in,
232 uint32_t *sourcelen, uint32_t *dstlen, void *model) 232 unsigned char *cpage_out,
233 uint32_t *sourcelen, uint32_t *dstlen,
234 void *model)
233{ 235{
234 int bits[8]; 236 int bits[8];
235 unsigned char histo[256]; 237 unsigned char histo[256];
@@ -306,15 +308,19 @@ static void rubin_do_decompress(int bit_divider, int *bits, unsigned char *cdata
306} 308}
307 309
308 310
309int jffs2_rubinmips_decompress(unsigned char *data_in, unsigned char *cpage_out, 311static int jffs2_rubinmips_decompress(unsigned char *data_in,
310 uint32_t sourcelen, uint32_t dstlen, void *model) 312 unsigned char *cpage_out,
313 uint32_t sourcelen, uint32_t dstlen,
314 void *model)
311{ 315{
312 rubin_do_decompress(BIT_DIVIDER_MIPS, bits_mips, data_in, cpage_out, sourcelen, dstlen); 316 rubin_do_decompress(BIT_DIVIDER_MIPS, bits_mips, data_in, cpage_out, sourcelen, dstlen);
313 return 0; 317 return 0;
314} 318}
315 319
316int jffs2_dynrubin_decompress(unsigned char *data_in, unsigned char *cpage_out, 320static int jffs2_dynrubin_decompress(unsigned char *data_in,
317 uint32_t sourcelen, uint32_t dstlen, void *model) 321 unsigned char *cpage_out,
322 uint32_t sourcelen, uint32_t dstlen,
323 void *model)
318{ 324{
319 int bits[8]; 325 int bits[8];
320 int c; 326 int c;
diff --git a/fs/jffs2/compr_zlib.c b/fs/jffs2/compr_zlib.c
index 9f9932c22adb..078a30e406b5 100644
--- a/fs/jffs2/compr_zlib.c
+++ b/fs/jffs2/compr_zlib.c
@@ -69,8 +69,10 @@ static void free_workspaces(void)
69#define free_workspaces() do { } while(0) 69#define free_workspaces() do { } while(0)
70#endif /* __KERNEL__ */ 70#endif /* __KERNEL__ */
71 71
72int jffs2_zlib_compress(unsigned char *data_in, unsigned char *cpage_out, 72static int jffs2_zlib_compress(unsigned char *data_in,
73 uint32_t *sourcelen, uint32_t *dstlen, void *model) 73 unsigned char *cpage_out,
74 uint32_t *sourcelen, uint32_t *dstlen,
75 void *model)
74{ 76{
75 int ret; 77 int ret;
76 78
@@ -135,8 +137,10 @@ int jffs2_zlib_compress(unsigned char *data_in, unsigned char *cpage_out,
135 return ret; 137 return ret;
136} 138}
137 139
138int jffs2_zlib_decompress(unsigned char *data_in, unsigned char *cpage_out, 140static int jffs2_zlib_decompress(unsigned char *data_in,
139 uint32_t srclen, uint32_t destlen, void *model) 141 unsigned char *cpage_out,
142 uint32_t srclen, uint32_t destlen,
143 void *model)
140{ 144{
141 int ret; 145 int ret;
142 int wbits = MAX_WBITS; 146 int wbits = MAX_WBITS;
diff --git a/fs/locks.c b/fs/locks.c
index 1792ce547af7..3fa6a7ce57a7 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -406,12 +406,12 @@ static void lease_release_private_callback(struct file_lock *fl)
406 fl->fl_file->f_owner.signum = 0; 406 fl->fl_file->f_owner.signum = 0;
407} 407}
408 408
409int lease_mylease_callback(struct file_lock *fl, struct file_lock *try) 409static int lease_mylease_callback(struct file_lock *fl, struct file_lock *try)
410{ 410{
411 return fl->fl_file == try->fl_file; 411 return fl->fl_file == try->fl_file;
412} 412}
413 413
414struct lock_manager_operations lease_manager_ops = { 414static struct lock_manager_operations lease_manager_ops = {
415 .fl_break = lease_break_callback, 415 .fl_break = lease_break_callback,
416 .fl_release_private = lease_release_private_callback, 416 .fl_release_private = lease_release_private_callback,
417 .fl_mylease = lease_mylease_callback, 417 .fl_mylease = lease_mylease_callback,
@@ -1274,7 +1274,7 @@ int fcntl_getlease(struct file *filp)
1274 * 1274 *
1275 * Called with kernel lock held. 1275 * Called with kernel lock held.
1276 */ 1276 */
1277int __setlease(struct file *filp, long arg, struct file_lock **flp) 1277static int __setlease(struct file *filp, long arg, struct file_lock **flp)
1278{ 1278{
1279 struct file_lock *fl, **before, **my_before = NULL, *lease = *flp; 1279 struct file_lock *fl, **before, **my_before = NULL, *lease = *flp;
1280 struct dentry *dentry = filp->f_dentry; 1280 struct dentry *dentry = filp->f_dentry;
diff --git a/fs/mbcache.c b/fs/mbcache.c
index f9e4d2700cd8..c7170b9221a3 100644
--- a/fs/mbcache.c
+++ b/fs/mbcache.c
@@ -57,7 +57,7 @@
57 57
58#define MB_CACHE_WRITER ((unsigned short)~0U >> 1) 58#define MB_CACHE_WRITER ((unsigned short)~0U >> 1)
59 59
60DECLARE_WAIT_QUEUE_HEAD(mb_cache_queue); 60static DECLARE_WAIT_QUEUE_HEAD(mb_cache_queue);
61 61
62MODULE_AUTHOR("Andreas Gruenbacher <a.gruenbacher@computer.org>"); 62MODULE_AUTHOR("Andreas Gruenbacher <a.gruenbacher@computer.org>");
63MODULE_DESCRIPTION("Meta block cache (for extended attributes)"); 63MODULE_DESCRIPTION("Meta block cache (for extended attributes)");
diff --git a/fs/mpage.c b/fs/mpage.c
index 68db5256a727..b92c0e64aefa 100644
--- a/fs/mpage.c
+++ b/fs/mpage.c
@@ -87,7 +87,7 @@ static int mpage_end_io_write(struct bio *bio, unsigned int bytes_done, int err)
87 return 0; 87 return 0;
88} 88}
89 89
90struct bio *mpage_bio_submit(int rw, struct bio *bio) 90static struct bio *mpage_bio_submit(int rw, struct bio *bio)
91{ 91{
92 bio->bi_end_io = mpage_end_io_read; 92 bio->bi_end_io = mpage_end_io_read;
93 if (rw == WRITE) 93 if (rw == WRITE)
diff --git a/fs/namei.c b/fs/namei.c
index 0f76fd75591b..defe6781e003 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2071,8 +2071,8 @@ exit:
2071 * ->i_sem on parents, which works but leads to some truely excessive 2071 * ->i_sem on parents, which works but leads to some truely excessive
2072 * locking]. 2072 * locking].
2073 */ 2073 */
2074int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry, 2074static int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry,
2075 struct inode *new_dir, struct dentry *new_dentry) 2075 struct inode *new_dir, struct dentry *new_dentry)
2076{ 2076{
2077 int error = 0; 2077 int error = 0;
2078 struct inode *target; 2078 struct inode *target;
@@ -2116,8 +2116,8 @@ int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry,
2116 return error; 2116 return error;
2117} 2117}
2118 2118
2119int vfs_rename_other(struct inode *old_dir, struct dentry *old_dentry, 2119static int vfs_rename_other(struct inode *old_dir, struct dentry *old_dentry,
2120 struct inode *new_dir, struct dentry *new_dentry) 2120 struct inode *new_dir, struct dentry *new_dentry)
2121{ 2121{
2122 struct inode *target; 2122 struct inode *target;
2123 int error; 2123 int error;
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c
index b74c4e3a64e2..87f4f9aeac86 100644
--- a/fs/nfs/idmap.c
+++ b/fs/nfs/idmap.c
@@ -79,7 +79,7 @@ static ssize_t idmap_pipe_upcall(struct file *, struct rpc_pipe_msg *,
79 char __user *, size_t); 79 char __user *, size_t);
80static ssize_t idmap_pipe_downcall(struct file *, const char __user *, 80static ssize_t idmap_pipe_downcall(struct file *, const char __user *,
81 size_t); 81 size_t);
82void idmap_pipe_destroy_msg(struct rpc_pipe_msg *); 82static void idmap_pipe_destroy_msg(struct rpc_pipe_msg *);
83 83
84static unsigned int fnvhash32(const void *, size_t); 84static unsigned int fnvhash32(const void *, size_t);
85 85
@@ -434,7 +434,7 @@ out:
434 return ret; 434 return ret;
435} 435}
436 436
437void 437static void
438idmap_pipe_destroy_msg(struct rpc_pipe_msg *msg) 438idmap_pipe_destroy_msg(struct rpc_pipe_msg *msg)
439{ 439{
440 struct idmap_msg *im = msg->data; 440 struct idmap_msg *im = msg->data;
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 6345f26e87ee..f2317f3e29f9 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1904,7 +1904,7 @@ static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags)
1904 } 1904 }
1905} 1905}
1906 1906
1907int nfs_init_inodecache(void) 1907static int nfs_init_inodecache(void)
1908{ 1908{
1909 nfs_inode_cachep = kmem_cache_create("nfs_inode_cache", 1909 nfs_inode_cachep = kmem_cache_create("nfs_inode_cache",
1910 sizeof(struct nfs_inode), 1910 sizeof(struct nfs_inode),
@@ -1916,7 +1916,7 @@ int nfs_init_inodecache(void)
1916 return 0; 1916 return 0;
1917} 1917}
1918 1918
1919void nfs_destroy_inodecache(void) 1919static void nfs_destroy_inodecache(void)
1920{ 1920{
1921 if (kmem_cache_destroy(nfs_inode_cachep)) 1921 if (kmem_cache_destroy(nfs_inode_cachep))
1922 printk(KERN_INFO "nfs_inode_cache: not all structures were freed\n"); 1922 printk(KERN_INFO "nfs_inode_cache: not all structures were freed\n");
diff --git a/fs/nls/nls_base.c b/fs/nls/nls_base.c
index 897512796edb..a912debcd20b 100644
--- a/fs/nls/nls_base.c
+++ b/fs/nls/nls_base.c
@@ -243,7 +243,7 @@ void unload_nls(struct nls_table *nls)
243 module_put(nls->owner); 243 module_put(nls->owner);
244} 244}
245 245
246wchar_t charset2uni[256] = { 246static wchar_t charset2uni[256] = {
247 /* 0x00*/ 247 /* 0x00*/
248 0x0000, 0x0001, 0x0002, 0x0003, 248 0x0000, 0x0001, 0x0002, 0x0003,
249 0x0004, 0x0005, 0x0006, 0x0007, 249 0x0004, 0x0005, 0x0006, 0x0007,
diff --git a/fs/select.c b/fs/select.c
index 25b1ccac2f2c..b80e7eb0ac0d 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -55,7 +55,8 @@ struct poll_table_page {
55 * as all select/poll functions have to call it to add an entry to the 55 * as all select/poll functions have to call it to add an entry to the
56 * poll table. 56 * poll table.
57 */ 57 */
58void __pollwait(struct file *filp, wait_queue_head_t *wait_address, poll_table *p); 58static void __pollwait(struct file *filp, wait_queue_head_t *wait_address,
59 poll_table *p);
59 60
60void poll_initwait(struct poll_wqueues *pwq) 61void poll_initwait(struct poll_wqueues *pwq)
61{ 62{
@@ -87,7 +88,8 @@ void poll_freewait(struct poll_wqueues *pwq)
87 88
88EXPORT_SYMBOL(poll_freewait); 89EXPORT_SYMBOL(poll_freewait);
89 90
90void __pollwait(struct file *filp, wait_queue_head_t *wait_address, poll_table *_p) 91static void __pollwait(struct file *filp, wait_queue_head_t *wait_address,
92 poll_table *_p)
91{ 93{
92 struct poll_wqueues *p = container_of(_p, struct poll_wqueues, pt); 94 struct poll_wqueues *p = container_of(_p, struct poll_wqueues, pt);
93 struct poll_table_page *table = p->table; 95 struct poll_table_page *table = p->table;