From patchwork Sat Aug 29 10:17:29 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mohanlal Jangir X-Patchwork-Id: 32495 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id CD4F3B708B for ; Sat, 29 Aug 2009 20:20:38 +1000 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1MhL0B-0000GW-OU; Sat, 29 Aug 2009 10:17:43 +0000 Received: from mail-qy0-f178.google.com ([209.85.221.178]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1MhL01-00007v-II for linux-mtd@lists.infradead.org; Sat, 29 Aug 2009 10:17:38 +0000 Received: by qyk8 with SMTP id 8so2161027qyk.2 for ; Sat, 29 Aug 2009 03:17:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=vHwfyAaY8cFLZ0go8z6rMJ2V2JlLkR9CEIGQbmAxodI=; b=RKHAnOboCK7SwaUy6GgjeIbellLTNHrAErV2Hp6O60TybbaQum2q8N8KIiMoyI4AuZ WQia9+WGDnM21/cL0lzqkczF2gDEOVOjMh8erBZWMpRO9yoXJsbwUp2oUC8dRw3xZsVh xhjlTVZJwH/Yzj9NanmVtKwDSR0kqYM8WNPcU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=fC/N1Vbt+zym8kb7RLBnUUzy+3GLaATFr9iemolSsIg/7G6nQ/X7EXmGpnYLaNAjnt 5h6e/XmiT9qojhgATgmmrgoWC5SQpp1rD35c1dBm1eoSazB0yA53q/KwpX6uEGudt1IC mr1ckN1GCUjqe7sQI9zy5SE6YQQCeAJKEWqCs= MIME-Version: 1.0 Received: by 10.229.92.211 with SMTP id s19mr1087938qcm.46.1251541050008; Sat, 29 Aug 2009 03:17:30 -0700 (PDT) Date: Sat, 29 Aug 2009 19:17:29 +0900 Message-ID: <58484c0e0908290317m62485b2bu6ca69db7de8111a5@mail.gmail.com> Subject: [PATCH] inappropriate pending block in foldchain From: Mohanlal Jangir To: linux-mtd@lists.infradead.org X-Spam-Score: 0.0 (/) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@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.