lkml.org 
[lkml]   [2002]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] return value for shrink_*_memory
Hi,

the following patch (lifted from rmap) gives shrink_icache_memory,
shrink_dqcache_memory and shrink_dcache_memory proper return values.
AFAICS this small patch doesn't clash with any of akpm's changes.

please apply,
thanks,

Rik
--
Bravely reimplemented by the knights who say "NIH".

dcache.c | 3 +--
dquot.c | 3 +--
inode.c | 3 +--
3 files changed, 3 insertions(+), 6 deletions(-)

diff -uNr linux-2.5.24/fs/dcache.c linux-2.5.24-rmap/fs/dcache.c
--- linux-2.5.24/fs/dcache.c Thu Jun 13 22:05:27 2002
+++ linux-2.5.24-rmap/fs/dcache.c Fri Jun 21 01:07:07 2002
@@ -602,8 +602,7 @@
count = dentry_stat.nr_unused / priority;

prune_dcache(count);
- kmem_cache_shrink(dentry_cache);
- return 0;
+ return kmem_cache_shrink(dentry_cache);
}

#define NAME_ALLOC_LEN(len) ((len+16) & ~15)
diff -uNr linux-2.5.24/fs/dquot.c linux-2.5.24-rmap/fs/dquot.c
--- linux-2.5.24/fs/dquot.c Sun Jun 16 22:46:39 2002
+++ linux-2.5.24-rmap/fs/dquot.c Fri Jun 21 01:07:07 2002
@@ -498,8 +498,7 @@
count = dqstats.free_dquots / priority;
prune_dqcache(count);
unlock_kernel();
- kmem_cache_shrink(dquot_cachep);
- return 0;
+ return kmem_cache_shrink(dquot_cachep);
}

/*
diff -uNr linux-2.5.24/fs/inode.c linux-2.5.24-rmap/fs/inode.c
--- linux-2.5.24/fs/inode.c Tue Jun 18 20:53:25 2002
+++ linux-2.5.24-rmap/fs/inode.c Fri Jun 21 01:07:07 2002
@@ -431,8 +431,7 @@
count = inodes_stat.nr_unused / priority;

prune_icache(count);
- kmem_cache_shrink(inode_cachep);
- return 0;
+ return kmem_cache_shrink(inode_cachep);
}

/*

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:27    [W:0.063 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site