summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-05 14:57:04 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-05 14:57:04 -0700
commit5136a6c0fd5b26bbf39ad761cf7a4fc563ad83a3 (patch)
tree7c905238cb2c5c9cd959cd652010b0eaf5f91db3 /fs
parente505a8d5f96a84f3043ce0c4eaee8f045996896c (diff)
parentbc8cec0dff072f1a45ce7f6b2c5234bb3411ac51 (diff)
downloadop-kernel-dev-5136a6c0fd5b26bbf39ad761cf7a4fc563ad83a3.zip
op-kernel-dev-5136a6c0fd5b26bbf39ad761cf7a4fc563ad83a3.tar.gz
Merge git://git.infradead.org/~dwmw2/mtd-2.6.31
* git://git.infradead.org/~dwmw2/mtd-2.6.31: JFFS2: add missing verify buffer allocation/deallocation mtd: nftl: fix offset alignments mtd: nftl: write support is broken mtd: m25p80: fix null pointer dereference bug
Diffstat (limited to 'fs')
-rw-r--r--fs/jffs2/wbuf.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
index d9a721e..5ef7bac 100644
--- a/fs/jffs2/wbuf.c
+++ b/fs/jffs2/wbuf.c
@@ -1268,10 +1268,20 @@ int jffs2_nor_wbuf_flash_setup(struct jffs2_sb_info *c) {
if (!c->wbuf)
return -ENOMEM;
+#ifdef CONFIG_JFFS2_FS_WBUF_VERIFY
+ c->wbuf_verify = kmalloc(c->wbuf_pagesize, GFP_KERNEL);
+ if (!c->wbuf_verify) {
+ kfree(c->wbuf);
+ return -ENOMEM;
+ }
+#endif
return 0;
}
void jffs2_nor_wbuf_flash_cleanup(struct jffs2_sb_info *c) {
+#ifdef CONFIG_JFFS2_FS_WBUF_VERIFY
+ kfree(c->wbuf_verify);
+#endif
kfree(c->wbuf);
}
OpenPOWER on IntegriCloud