mtd/fs/jffs2 scan.c,1.110,1.111
gleixner at infradead.org
gleixner at infradead.org
Tue Jul 27 10:13:45 EDT 2004
Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv19950
Modified Files:
scan.c
Log Message:
Respect kmalloc limit when allocating the scan buffer
Index: scan.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/scan.c,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -r1.110 -r1.111
--- scan.c 17 Jun 2004 17:15:31 -0000 1.110
+++ scan.c 27 Jul 2004 14:13:43 -0000 1.111
@@ -104,6 +104,10 @@
else
buf_size = PAGE_SIZE;
+ /* Respect kmalloc limitations */
+ if (buf_size > 128*1024)
+ buf_size = 128*1024;
+
D1(printk(KERN_DEBUG "Allocating readbuf of %d bytes\n", buf_size));
flashbuf = kmalloc(buf_size, GFP_KERNEL);
if (!flashbuf)
More information about the linux-mtd-cvs
mailing list