Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.4.13-ac8 /fs/dcache.c

Filename:/fs/dcache.c
Lines Added:4
Lines Deleted:4
Also changed in: (Previous) 2.4.13-ac7  2.4.13-ac6  2.4.13-ac5  2.4.13-ac4  2.4.13-ac3  2.4.13-ac1 
(Following) 2.4.17-pre6  2.4.17-pre7  2.4.17-pre8  2.4.17-rc1  2.4.17-rc2  2.4.17 

Location
[  2.4.13-ac8
  [  fs
     o  dcache.c

Patch

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/dcache.c linux.ac/fs/dcache.c
--- linux.vanilla/fs/dcache.c   Tue Sep 18 00:15:02 2001
+++ linux.ac/fs/dcache.c   Wed Oct 10 01:48:21 2001
@@ -547,7 +547,7 @@
  *  ...
  *   6 - base-level: try to shrink a bit.
  */
-int shrink_dcache_memory(int priority, unsigned int gfp_mask)
+void shrink_dcache_memory(int priority, unsigned int gfp_mask)
 {
    int count = 0;
 
@@ -563,13 +563,13 @@
     * block allocations, but for now:
     */
    if (!(gfp_mask & __GFP_FS))
-      return 0;
+      return;
 
-   count = dentry_stat.nr_unused / priority;
+   if (priority)
+      count = dentry_stat.nr_unused / priority;
 
    prune_dcache(count);
    kmem_cache_shrink(dentry_cache);
-   return 0;
 }
 
 #define NAME_ALLOC_LEN(len)   ((len+16) & ~15)


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.