mtd: block2mtd: fix recursive call of mtd_writev
authorGabor Juhos <juhosg@openwrt.org>
Wed, 23 May 2012 22:17:23 +0000 (00:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 Jun 2012 15:36:13 +0000 (00:36 +0900)
commit29924c0318327d0444e0317587faf4a0693527a8
tree8d5f8989e714c3ec07ec42886865cb80d08ef489
parentbdcefb1987edb1c62828d6c79f93e4b7af8734e2
mtd: block2mtd: fix recursive call of mtd_writev

commit 2e24e32e2759348c9290404abad4f729f791bfad upstream.

The 'mtd_writev' interface calls the function assigned
to the '_write' field of a given mtd device if that is
not NULL. The block2mtd driver sets the '_writev' field
to the 'mtd_writev' function itself and thus causes a
endless loop.

This is caused by 1dbebd32562b3c2caeca35960e5cb00bfcc12900
(mtd: harmonize mtd_writev usage).

Remove the assignment from the block2mtd driver to fix the
issue.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/devices/block2mtd.c