Our API should consider vfs_dcache_size=0 to mean that the dentry group should be destroyed. Nothing else is meaningful. --- fs/dcache.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/fs/dcache.c b/fs/dcache.c index 0960b80..c9e988d 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -3044,6 +3044,11 @@ int dcache_set_mob_size(struct dentry *de, unsigned long size) if (mob == &init_dentry_mob) /* for safety */ return 0; + if (size == 0) { + destroy_mob(de->d_mob); + return 0; + } + mob->nr_dentry_max = size; usage = percpu_counter_sum_positive(&mob->nr_dentry); if (usage > mob->nr_dentry_max) -- 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