From patchwork Sat Aug 29 10:17:29 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: inappropriate pending block in foldchain Date: Sat, 29 Aug 2009 00:17:29 -0000 From: Mohanlal Jangir X-Patchwork-Id: 32495 Message-Id: <58484c0e0908290317m62485b2bu6ca69db7de8111a5@mail.gmail.com> To: linux-mtd@lists.infradead.org In function INFTL_findwriteunit, inappropriate pending block parameter is passed which prevents 0xFFFF block copy during foldchain. This patch fixes the problem. -Mohan diff -Nur a/linux-2.6.30.5/drivers/mtd/inftlcore.c b/linux-2.6.30.5/drivers/mtd/inftlcore.c --- a/linux-2.6.30.5/drivers/mtd/inftlcore.c 2009-08-17 06:19:38.000000000 +0900 +++ b/linux-2.6.30.5/drivers/mtd/inftlcore.c 2009-08-29 19:04:21.953125000 +0900 @@ -549,7 +549,7 @@      * waiting to be picked up. We're going to have to fold      * a chain to make room.      */ -   thisEUN = INFTL_makefreeblock(inftl, 0xffff); +   thisEUN = INFTL_makefreeblock(inftl, block);     /*      * Hopefully we free something, lets try again.