GIT: unionfs2-2.6.27.y: [PATCH] unionfs: make functions static

Erez Zadok ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:16:50 EDT 2010


commit 1b47f8082d6aba84b951713a361eef5f70b6b0a6
Author: Adrian Bunk <bunk at stusta.de>
Date:   Mon Jul 2 14:27:57 2007 -0400

    [PATCH] unionfs: make functions static
    
    This patch makes some needlessly global functions static.
    
    Signed-off-by: Adrian Bunk <bunk at stusta.de>
    Signed-off-by: Josef 'Jeff' Sipek <jsipek at cs.sunysb.edu>

diff --git a/fs/unionfs/lookup.c b/fs/unionfs/lookup.c
index f21a9f3..4916f25 100644
--- a/fs/unionfs/lookup.c
+++ b/fs/unionfs/lookup.c
@@ -18,6 +18,8 @@
 
 #include "union.h"
 
+static int realloc_dentry_private_data(struct dentry *dentry);
+
 /* is the filename valid == !(whiteout for a file or opaque dir marker) */
 static int is_validname(const char *name)
 {
@@ -514,7 +516,7 @@ static inline int __realloc_dentry_private_data(struct dentry *dentry)
 }
 
 /* UNIONFS_D(dentry)->lock must be locked */
-int realloc_dentry_private_data(struct dentry *dentry)
+static int realloc_dentry_private_data(struct dentry *dentry)
 {
 	if (!__realloc_dentry_private_data(dentry))
 		return 0;
diff --git a/fs/unionfs/mmap.c b/fs/unionfs/mmap.c
index 9cd51f0..40f7f29 100644
--- a/fs/unionfs/mmap.c
+++ b/fs/unionfs/mmap.c
@@ -52,7 +52,7 @@
  * such day as Linux can better support address_space_ops in a stackable
  * fashion.
  */
-int unionfs_writepage(struct page *page, struct writeback_control *wbc)
+static int unionfs_writepage(struct page *page, struct writeback_control *wbc)
 {
 	int err = -EIO;
 	struct inode *inode;
@@ -181,7 +181,7 @@ out:
 	return err;
 }
 
-int unionfs_readpage(struct file *file, struct page *page)
+static int unionfs_readpage(struct file *file, struct page *page)
 {
 	int err;
 
@@ -211,8 +211,8 @@ out:
 	return err;
 }
 
-int unionfs_prepare_write(struct file *file, struct page *page, unsigned from,
-			  unsigned to)
+static int unionfs_prepare_write(struct file *file, struct page *page,
+				 unsigned from, unsigned to)
 {
 	int err;
 
@@ -236,8 +236,8 @@ int unionfs_prepare_write(struct file *file, struct page *page, unsigned from,
 	return err;
 }
 
-int unionfs_commit_write(struct file *file, struct page *page, unsigned from,
-			 unsigned to)
+static int unionfs_commit_write(struct file *file, struct page *page,
+				unsigned from, unsigned to)
 {
 	int err = -ENOMEM;
 	struct inode *inode, *lower_inode;
@@ -302,7 +302,7 @@ out:
 	return err;		/* assume all is ok */
 }
 
-void unionfs_sync_page(struct page *page)
+static void unionfs_sync_page(struct page *page)
 {
 	struct inode *inode;
 	struct inode *lower_inode;
diff --git a/fs/unionfs/union.h b/fs/unionfs/union.h
index 00f2b36..50f7f83 100644
--- a/fs/unionfs/union.h
+++ b/fs/unionfs/union.h
@@ -248,7 +248,6 @@ static inline void unionfs_double_lock_dentry(struct dentry *d1,
 	unionfs_lock_dentry(d2);
 }
 
-extern int realloc_dentry_private_data(struct dentry *dentry);
 extern int new_dentry_private_data(struct dentry *dentry);
 extern void free_dentry_private_data(struct dentry *dentry);
 extern void update_bstart(struct dentry *dentry);


More information about the unionfs-cvs mailing list