GIT: unionfs2-2.6.27.y: Unionfs: prototype and location change for unionfs_get_nlinks

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


commit 410b3ad740ca1c7c7bbfabf3846067f6666793cc
Author: Erez_Zadok <ezk at cs.sunysb.edu>
Date:   Sun Jun 17 22:36:03 2007 -0400

    Unionfs: prototype and location change for unionfs_get_nlinks
    
    Change prototype of unionfs_get_nlinks to take a const inode.  Also move
    extern for unionfs_get_nlinks so it can be refereed to in other Unionfs
    header files.
    
    Signed-off-by: Erez Zadok <ezk at cs.sunysb.edu>

diff --git a/fs/unionfs/subr.c b/fs/unionfs/subr.c
index 4c18b3a..5db9e62 100644
--- a/fs/unionfs/subr.c
+++ b/fs/unionfs/subr.c
@@ -181,7 +181,7 @@ out:
  * returns the sum of the n_link values of all the underlying inodes of the
  * passed inode
  */
-int unionfs_get_nlinks(struct inode *inode)
+int unionfs_get_nlinks(const struct inode *inode)
 {
 	int sum_nlinks = 0;
 	int dirs = 0;
diff --git a/fs/unionfs/union.h b/fs/unionfs/union.h
index f7c65e8..7a3871b 100644
--- a/fs/unionfs/union.h
+++ b/fs/unionfs/union.h
@@ -177,6 +177,9 @@ struct unionfs_dir_state {
 	struct list_head list[0];
 };
 
+/* externs needed for fanout.h or sioq.h */
+extern int unionfs_get_nlinks(const struct inode *inode);
+
 /* include miscellaneous macros */
 #include "fanout.h"
 #include "sioq.h"
@@ -279,8 +282,6 @@ extern int remove_whiteouts(struct dentry *dentry,
 extern int do_delete_whiteouts(struct dentry *dentry, int bindex,
 			       struct unionfs_dir_state *namelist);
 
-extern int unionfs_get_nlinks(struct inode *inode);
-
 /* Is this directory empty: 0 if it is empty, -ENOTEMPTY if not. */
 extern int check_empty(struct dentry *dentry,
 		       struct unionfs_dir_state **namelist);


More information about the unionfs-cvs mailing list