Very simple function to test if a given dentry is the root of a dentry group (mob) --- fs/dcache.c | 6 ++++++ include/linux/dcache.h | 1 + 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/fs/dcache.c b/fs/dcache.c index 39db354..0960b80 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -3000,6 +3000,12 @@ rename_retry: goto again; } + +int dentry_is_mob_root(struct dentry *root) +{ + return (root->d_flags & DCACHE_MOB_ROOT); +} + int dcache_new_mob(struct dentry *root) { struct dentry_mob *dmob, *old = NULL; diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 7b1fdc1..fd137c7 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -62,6 +62,7 @@ struct dentry_mob_stat { }; int dcache_new_mob(struct dentry *root); +int dentry_is_mob_root(struct dentry *root); int dcache_set_mob_size(struct dentry *de, unsigned long size); int dcache_get_mob_stat(struct dentry *de, struct dentry_mob_stat __user *stat); -- 1.7.5.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