This patch adds a new helper function d_count() in dcache.h for returning the current reference count of the dentry object. It should be used by all the files outside of the core dcache.c and namei.c files. Signed-off-by: Waiman Long <Waiman.Long@xxxxxx> --- include/linux/dcache.h | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/include/linux/dcache.h b/include/linux/dcache.h index f42dbe1..7c6bbf0 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -258,6 +258,16 @@ extern int have_submounts(struct dentry *); extern void d_rehash(struct dentry *); /** + * d_count - return the reference count in dentry + * @entry: dentry pointer + * Returns: current value of reference count + */ +static inline unsigned int d_count(struct dentry *entry) +{ + return entry->d_count; +} + +/** * d_add - add dentry to hash queues * @entry: dentry to add * @inode: The inode to attach to this dentry -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html