summaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-06-13 16:29:25 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-06-13 16:29:25 +0000
commitdb7d4daea91e105e3859cf461d7e53b9b77454b2 (patch)
tree9bb65b95440af09e8aca63abe56970dd3360cc57 /fs/dcache.c
parent9c1c01ead627bdda9211c9abd5b758d6c687d8ac (diff)
Merge with Linux 2.2.8.
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 51c7869b3..aa299f61e 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -2,7 +2,8 @@
* fs/dcache.c
*
* Complete reimplementation
- * (C) 1997 Thomas Schoebel-Theuer
+ * (C) 1997 Thomas Schoebel-Theuer,
+ * with heavy changes by Linus Torvalds
*/
/*
@@ -470,7 +471,12 @@ void shrink_dcache_parent(struct dentry * parent)
*/
void shrink_dcache_memory(int priority, unsigned int gfp_mask)
{
- prune_dcache(0);
+ if (gfp_mask & __GFP_IO) {
+ int count = 0;
+ if (priority)
+ count = dentry_stat.nr_unused / priority;
+ prune_dcache(count);
+ }
}
#define NAME_ALLOC_LEN(len) ((len+16) & ~15)