fs/: make some code static
Subsystems (3)
PATCH 1/1 fs/: make some code static
This patch makes some needlessly global code static.
Signed-off-by Adrian Bunk <[email protected]>
---
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(-)
fs/bad_inode.c renamed from fs/bad_inode.c.old +1 -1
@@ -47,7 +47,7 @@ .get_unmapped_area = EIO_ERROR, }; -struct inode_operations bad_inode_ops = +static struct inode_operations bad_inode_ops = { .create =EIO_ERROR , .lookup =EIO_ERROR ,
fs/buffer.c renamed from fs/buffer.c.old +1 -1
@@ -1215,7 +1215,7 @@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 */
fs/char_dev.c renamed from fs/char_dev.c.old +1 -1
@@ -329,7 +329,7 @@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)) {
fs/dcache.c renamed from fs/dcache.c.old +1 -1
@@ -39,7 +39,7 @@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);
fs/eventpoll.c renamed from fs/eventpoll.c.old +1 -1
@@ -320,7 +320,7 @@/* * 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;
include/linux/binfmts.h renamed from include/linux/binfmts.h.old +0 -1
@@ -77,7 +77,6 @@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);
fs/exec.c renamed from fs/exec.c.old +2 -1
@@ -197,7 +197,8 @@* 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 ;
fs/locks.c renamed from fs/locks.c.old +3 -3
@@ -406,12 +406,12 @@ 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 @@* * 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;
fs/mbcache.c renamed from fs/mbcache.c.old +1 -1
@@ -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 <[email protected]>" );MODULE_DESCRIPTION ("Meta block cache (for extended attributes)" );
fs/mpage.c renamed from fs/mpage.c.old +1 -1
@@ -87,7 +87,7 @@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 )
fs/namei.c renamed from fs/namei.c.old +4 -4
@@ -2068,8 +2068,8 @@* ->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;
@@ -2113,8 +2113,8 @@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;
fs/select.c renamed from fs/select.c.old +4 -2
@@ -55,7 +55,8 @@* 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 @@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;