d1522b3e4cc5a80920d4eb93d2a72f8a6b9f3fb1
[vuplus_openembedded] / recipes / linux / linux-dm8000-2.6.18 / linux-2.6.18-big-summary.patch
1 diff -Naur linux-2.6.18-org/fs/jffs2/summary.c linux-2.6.18/fs/jffs2/summary.c
2 --- linux-2.6.18-org/fs/jffs2/summary.c 2011-03-15 16:32:15.374923000 +0100
3 +++ linux-2.6.18/fs/jffs2/summary.c     2011-03-15 16:33:05.246923008 +0100
4 @@ -37,7 +37,7 @@
5  
6         memset(c->summary, 0, sizeof(struct jffs2_summary));
7  
8 -       c->summary->sum_buf = kmalloc(sum_size, GFP_KERNEL);
9 +       c->summary->sum_buf = vmalloc(c->sector_size);
10  
11         if (!c->summary->sum_buf) {
12                 JFFS2_WARNING("Can't allocate buffer for writing out summary information!\n");
13 @@ -56,7 +56,7 @@
14  
15         jffs2_sum_disable_collecting(c->summary);
16  
17 -       kfree(c->summary->sum_buf);
18 +       vfree(c->summary->sum_buf);
19         c->summary->sum_buf = NULL;
20  
21         kfree(c->summary);
22 @@ -667,7 +667,7 @@
23         int ret;
24         size_t retlen;
25  
26 -       if (padsize + datasize > MAX_SUMMARY_SIZE) {
27 +       if (0 && padsize + datasize > MAX_SUMMARY_SIZE) {
28                 /* It won't fit in the buffer. Abort summary for this jeb */
29                 jffs2_sum_disable_collecting(c->summary);
30