2001-07-30 12:42:35

by Mark Hemment

[permalink] [raw]
Subject: [PATCH] select_parent


Minor patch.

fs/dcache.c:select_parent() moves unused dentries to the head of the
unused list, ready for a call to prune_dcache(). However, it doesn't
clear the referenced-bit. At worst, this could result in a bit of
extra work and a few unnecessary dentires reaped.

Please apply.

Mark


diff -ur -X dontdiff linux-2.4.7/fs/dcache.c dcache-2.4.7/fs/dcache.c
--- linux-2.4.7/fs/dcache.c Thu Jul 5 18:14:23 2001
+++ dcache-2.4.7/fs/dcache.c Mon Jul 30 14:00:45 2001
@@ -491,6 +491,7 @@
if (!atomic_read(&dentry->d_count)) {
list_del(&dentry->d_lru);
list_add(&dentry->d_lru, dentry_unused.prev);
+ dentry->d_vfs_flags &= ~DCACHE_REFERENCED;
found++;
}
/*