[RFC 4/5] destroy 0-sized mobs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux