From b7600dba6d4fbf3897e517b322d006986cce831a Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Fri, 1 Aug 2008 10:07:51 +0100 Subject: [JFFS2] Fix allocation of summary buffer We can't use vmalloc for the buffer we use for writing summaries, because some drivers may want to DMA from it. So limit the size to 64KiB and use kmalloc for it instead. Signed-off-by: David Woodhouse --- fs/jffs2/summary.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'fs/jffs2/summary.h') diff --git a/fs/jffs2/summary.h b/fs/jffs2/summary.h index 8bf34f2fa5ce..60207a2ae952 100644 --- a/fs/jffs2/summary.h +++ b/fs/jffs2/summary.h @@ -13,6 +13,12 @@ #ifndef JFFS2_SUMMARY_H #define JFFS2_SUMMARY_H +/* Limit summary size to 64KiB so that we can kmalloc it. If the summary + is larger than that, we have to just ditch it and avoid using summary + for the eraseblock in question... and it probably doesn't hurt us much + anyway. */ +#define MAX_SUMMARY_SIZE 65536 + #include #include -- cgit v1.2.3-59-g8ed1b