Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 5 Jul 2002 14:38:35 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 5 Jul 2002 14:38:34 -0400 Received: from garrincha.netbank.com.br ([200.203.199.88]:12552 "HELO garrincha.netbank.com.br") by vger.kernel.org with SMTP id ; Fri, 5 Jul 2002 14:38:34 -0400 Date: Fri, 5 Jul 2002 15:40:33 -0300 (BRT) From: Rik van Riel X-X-Sender: riel@imladris.surriel.com To: Linus Torvalds cc: Andrew Morton , Subject: [PATCH] return value for shrink_*_memory Message-ID: X-spambait: aardvark@kernelnewbies.org X-spammeplease: aardvark@nl.linux.org MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1792 Lines: 64 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/