From: Erez_Zadok Date: Mon, 18 Jun 2007 02:36:03 +0000 (-0400) Subject: Unionfs: prototype and location change for unionfs_get_nlinks X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=e9622dde1ac240739faf16eb043285685b017aa7;p=unionfs-2.6.34.y.git 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 --- diff --git a/fs/unionfs/subr.c b/fs/unionfs/subr.c index 4c18b3a3c92..5db9e6204a4 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 f7c65e8ae48..7a3871bdef7 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);