lkml.org 
[lkml]   [2006]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] fix overflow in inode.c
The following patch fixes an overflow in inode.c.  This overflow can
cause a system to stop reclaiming inodes, with a large amount of memory
and zillions of inodes. This has caused systems to run out of low
memory in real world situations.

Thanks go out to Larry Woodman, as well as the unnamed customer who
first tracked this problem down. You know who you are.


Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Larry Woodman <lwoodman@redhat.com>

--- linux-2.4.32/fs/inode.c.overflow 2006-02-17 15:55:16.000000000 -0500
+++ linux-2.4.32/fs/inode.c 2006-02-17 15:56:37.000000000 -0500
@@ -854,8 +854,8 @@ void prune_icache(int goal)
*/
if (goal <= 0)
return;
- if (inodes_stat.nr_unused * sizeof(struct inode) * 10 <
- freeable_lowmem() * PAGE_SIZE)
+ if (inodes_stat.nr_unused <
+ (freeable_lowmem() * PAGE_SIZE) / (sizeof(struct inode) * 10))
return;

wakeup_bdflush();
-
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: 2006-02-17 22:06    [W:0.218 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site