summaryrefslogtreecommitdiffstats
path: root/fs/jffs2/summary.h
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2008-08-01 10:07:51 +0100
committerDavid Woodhouse <David.Woodhouse@intel.com>2008-08-01 10:07:51 +0100
commitb7600dba6d4fbf3897e517b322d006986cce831a (patch)
tree0b8c7aa760aa73e0832724c5546092997d2a6ef3 /fs/jffs2/summary.h
parentf6ed6f78d46b43b6d908b39ed3322f7cda23f4a8 (diff)
downloadlinux-b7600dba6d4fbf3897e517b322d006986cce831a.tar.gz
linux-b7600dba6d4fbf3897e517b322d006986cce831a.tar.bz2
linux-b7600dba6d4fbf3897e517b322d006986cce831a.zip
[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 <David.Woodhouse@intel.com>
Diffstat (limited to 'fs/jffs2/summary.h')
-rw-r--r--fs/jffs2/summary.h6
1 files changed, 6 insertions, 0 deletions
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 <linux/uio.h>
#include <linux/jffs2.h>