JFFS2: add missing verify buffer allocation/deallocation
commit6c135b4e133017a8aeef1534107ee4b1f11d3265
authorMassimo Cirillo <maxcir@gmail.com>
Thu, 27 Aug 2009 08:44:09 +0000 (27 10:44 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Sep 2009 17:45:23 +0000 (15 10:45 -0700)
tree46aed16ca5eca6cb4c77a88e480b3abf7a41b6e3
parent22a3f9b74ab211deb28e35549284d9f459232c5f
JFFS2: add missing verify buffer allocation/deallocation

commit bc8cec0dff072f1a45ce7f6b2c5234bb3411ac51 upstream.

The function jffs2_nor_wbuf_flash_setup() doesn't allocate the verify buffer
if CONFIG_JFFS2_FS_WBUF_VERIFY is defined, so causing a kernel panic when
that macro is enabled and the verify function is called. Similarly the
jffs2_nor_wbuf_flash_cleanup() must free the buffer if
CONFIG_JFFS2_FS_WBUF_VERIFY is enabled.
The following patch fixes the problem.
The following patch applies to 2.6.30 kernel.

Signed-off-by: Massimo Cirillo <maxcir@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/jffs2/wbuf.c