
From: Adrian Bunk <bunk@stusta.de>

This patch makes some needlessly global code static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 fs/bad_inode.c          |    2 +-
 fs/buffer.c             |    2 +-
 fs/char_dev.c           |    2 +-
 fs/dcache.c             |    2 +-
 fs/eventpoll.c          |    2 +-
 fs/exec.c               |    3 ++-
 fs/locks.c              |    6 +++---
 fs/mbcache.c            |    2 +-
 fs/mpage.c              |    2 +-
 fs/namei.c              |    8 ++++----
 fs/select.c             |    6 ++++--
 include/linux/binfmts.h |    1 -
 12 files changed, 20 insertions(+), 18 deletions(-)

diff -puN fs/bad_inode.c~fs-make-some-code-static fs/bad_inode.c
--- 25/fs/bad_inode.c~fs-make-some-code-static	2005-05-03 16:15:03.000000000 -0700
+++ 25-akpm/fs/bad_inode.c	2005-05-03 16:15:03.000000000 -0700
@@ -47,7 +47,7 @@ static struct file_operations bad_file_o
 	.get_unmapped_area = EIO_ERROR,
 };
 
-struct inode_operations bad_inode_ops =
+static struct inode_operations bad_inode_ops =
 {
 	.create		= EIO_ERROR,
 	.lookup		= EIO_ERROR,
diff -puN fs/buffer.c~fs-make-some-code-static fs/buffer.c
--- 25/fs/buffer.c~fs-make-some-code-static	2005-05-03 16:15:03.000000000 -0700
+++ 25-akpm/fs/buffer.c	2005-05-03 16:15:03.000000000 -0700
@@ -1233,7 +1233,7 @@ grow_buffers(struct block_device *bdev, 
 	return 1;
 }
 
-struct buffer_head *
+static struct buffer_head *
 __getblk_slow(struct block_device *bdev, sector_t block, int size)
 {
 	/* Size must be multiple of hard sectorsize */
diff -puN fs/char_dev.c~fs-make-some-code-static fs/char_dev.c
--- 25/fs/char_dev.c~fs-make-some-code-static	2005-05-03 16:15:03.000000000 -0700
+++ 25-akpm/fs/char_dev.c	2005-05-03 16:15:03.000000000 -0700
@@ -339,7 +339,7 @@ void cd_forget(struct inode *inode)
 	spin_unlock(&cdev_lock);
 }
 
-void cdev_purge(struct cdev *cdev)
+static void cdev_purge(struct cdev *cdev)
 {
 	spin_lock(&cdev_lock);
 	while (!list_empty(&cdev->list)) {
diff -puN fs/dcache.c~fs-make-some-code-static fs/dcache.c
--- 25/fs/dcache.c~fs-make-some-code-static	2005-05-03 16:15:03.000000000 -0700
+++ 25-akpm/fs/dcache.c	2005-05-03 16:15:03.000000000 -0700
@@ -39,7 +39,7 @@ int sysctl_vfs_cache_pressure = 100;
 EXPORT_SYMBOL_GPL(sysctl_vfs_cache_pressure);
 
  __cacheline_aligned_in_smp DEFINE_SPINLOCK(dcache_lock);
-seqlock_t rename_lock __cacheline_aligned_in_smp = SEQLOCK_UNLOCKED;
+static seqlock_t rename_lock __cacheline_aligned_in_smp = SEQLOCK_UNLOCKED;
 
 EXPORT_SYMBOL(dcache_lock);
 
diff -puN fs/eventpoll.c~fs-make-some-code-static fs/eventpoll.c
--- 25/fs/eventpoll.c~fs-make-some-code-static	2005-05-03 16:15:03.000000000 -0700
+++ 25-akpm/fs/eventpoll.c	2005-05-03 16:15:03.000000000 -0700
@@ -320,7 +320,7 @@ static struct super_block *eventpollfs_g
 /*
  * This semaphore is used to serialize ep_free() and eventpoll_release_file().
  */
-struct semaphore epsem;
+static struct semaphore epsem;
 
 /* Safe wake up implementation */
 static struct poll_safewake psw;
diff -puN fs/exec.c~fs-make-some-code-static fs/exec.c
--- 25/fs/exec.c~fs-make-some-code-static	2005-05-03 16:15:03.000000000 -0700
+++ 25-akpm/fs/exec.c	2005-05-03 16:15:03.000000000 -0700
@@ -197,7 +197,8 @@ static int count(char __user * __user * 
  * memory to free pages in kernel mem. These are in a format ready
  * to be put directly into the top of new user memory.
  */
-int copy_strings(int argc,char __user * __user * argv, struct linux_binprm *bprm)
+static int copy_strings(int argc, char __user * __user * argv,
+			struct linux_binprm *bprm)
 {
 	struct page *kmapped_page = NULL;
 	char *kaddr = NULL;
diff -puN fs/locks.c~fs-make-some-code-static fs/locks.c
--- 25/fs/locks.c~fs-make-some-code-static	2005-05-03 16:15:03.000000000 -0700
+++ 25-akpm/fs/locks.c	2005-05-03 16:15:03.000000000 -0700
@@ -406,12 +406,12 @@ static void lease_release_private_callba
 	fl->fl_file->f_owner.signum = 0;
 }
 
-int lease_mylease_callback(struct file_lock *fl, struct file_lock *try)
+static int lease_mylease_callback(struct file_lock *fl, struct file_lock *try)
 {
 	return fl->fl_file == try->fl_file;
 }
 
-struct lock_manager_operations lease_manager_ops = {
+static struct lock_manager_operations lease_manager_ops = {
 	.fl_break = lease_break_callback,
 	.fl_release_private = lease_release_private_callback,
 	.fl_mylease = lease_mylease_callback,
@@ -1274,7 +1274,7 @@ int fcntl_getlease(struct file *filp)
  *
  *	Called with kernel lock held.
  */
-int __setlease(struct file *filp, long arg, struct file_lock **flp)
+static int __setlease(struct file *filp, long arg, struct file_lock **flp)
 {
 	struct file_lock *fl, **before, **my_before = NULL, *lease = *flp;
 	struct dentry *dentry = filp->f_dentry;
diff -puN fs/mbcache.c~fs-make-some-code-static fs/mbcache.c
--- 25/fs/mbcache.c~fs-make-some-code-static	2005-05-03 16:15:03.000000000 -0700
+++ 25-akpm/fs/mbcache.c	2005-05-03 16:15:03.000000000 -0700
@@ -57,7 +57,7 @@
 
 #define MB_CACHE_WRITER ((unsigned short)~0U >> 1)
 
-DECLARE_WAIT_QUEUE_HEAD(mb_cache_queue);
+static DECLARE_WAIT_QUEUE_HEAD(mb_cache_queue);
 		
 MODULE_AUTHOR("Andreas Gruenbacher <a.gruenbacher@computer.org>");
 MODULE_DESCRIPTION("Meta block cache (for extended attributes)");
diff -puN fs/mpage.c~fs-make-some-code-static fs/mpage.c
--- 25/fs/mpage.c~fs-make-some-code-static	2005-05-03 16:15:03.000000000 -0700
+++ 25-akpm/fs/mpage.c	2005-05-03 16:15:03.000000000 -0700
@@ -87,7 +87,7 @@ static int mpage_end_io_write(struct bio
 	return 0;
 }
 
-struct bio *mpage_bio_submit(int rw, struct bio *bio)
+static struct bio *mpage_bio_submit(int rw, struct bio *bio)
 {
 	bio->bi_end_io = mpage_end_io_read;
 	if (rw == WRITE)
diff -puN fs/namei.c~fs-make-some-code-static fs/namei.c
--- 25/fs/namei.c~fs-make-some-code-static	2005-05-03 16:15:03.000000000 -0700
+++ 25-akpm/fs/namei.c	2005-05-03 16:15:03.000000000 -0700
@@ -2072,8 +2072,8 @@ exit:
  *	   ->i_sem on parents, which works but leads to some truely excessive
  *	   locking].
  */
-int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry,
-	       struct inode *new_dir, struct dentry *new_dentry)
+static int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry,
+			  struct inode *new_dir, struct dentry *new_dentry)
 {
 	int error = 0;
 	struct inode *target;
@@ -2117,8 +2117,8 @@ int vfs_rename_dir(struct inode *old_dir
 	return error;
 }
 
-int vfs_rename_other(struct inode *old_dir, struct dentry *old_dentry,
-	       struct inode *new_dir, struct dentry *new_dentry)
+static int vfs_rename_other(struct inode *old_dir, struct dentry *old_dentry,
+			    struct inode *new_dir, struct dentry *new_dentry)
 {
 	struct inode *target;
 	int error;
diff -puN fs/select.c~fs-make-some-code-static fs/select.c
--- 25/fs/select.c~fs-make-some-code-static	2005-05-03 16:15:03.000000000 -0700
+++ 25-akpm/fs/select.c	2005-05-03 16:15:03.000000000 -0700
@@ -55,7 +55,8 @@ struct poll_table_page {
  * as all select/poll functions have to call it to add an entry to the
  * poll table.
  */
-void __pollwait(struct file *filp, wait_queue_head_t *wait_address, poll_table *p);
+static void __pollwait(struct file *filp, wait_queue_head_t *wait_address,
+		       poll_table *p);
 
 void poll_initwait(struct poll_wqueues *pwq)
 {
@@ -87,7 +88,8 @@ void poll_freewait(struct poll_wqueues *
 
 EXPORT_SYMBOL(poll_freewait);
 
-void __pollwait(struct file *filp, wait_queue_head_t *wait_address, poll_table *_p)
+static void __pollwait(struct file *filp, wait_queue_head_t *wait_address,
+		       poll_table *_p)
 {
 	struct poll_wqueues *p = container_of(_p, struct poll_wqueues, pt);
 	struct poll_table_page *table = p->table;
diff -puN include/linux/binfmts.h~fs-make-some-code-static include/linux/binfmts.h
--- 25/include/linux/binfmts.h~fs-make-some-code-static	2005-05-03 16:15:03.000000000 -0700
+++ 25-akpm/include/linux/binfmts.h	2005-05-03 16:15:03.000000000 -0700
@@ -77,7 +77,6 @@ extern int flush_old_exec(struct linux_b
 extern int setup_arg_pages(struct linux_binprm * bprm,
 			   unsigned long stack_top,
 			   int executable_stack);
-extern int copy_strings(int argc,char __user * __user * argv,struct linux_binprm *bprm); 
 extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm);
 extern void compute_creds(struct linux_binprm *binprm);
 extern int do_coredump(long signr, int exit_code, struct pt_regs * regs);
_
