From 910583f140455b293741385bd92082c8c68cc62a Mon Sep 17 00:00:00 2001 From: Erez_Zadok Date: Sun, 17 Jun 2007 22:36:03 -0400 Subject: [PATCH] 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 --- fs/unionfs/subr.c | 2 +- fs/unionfs/union.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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); -- 2.43.0