[<prev] [next>] [day] [month] [year] [list]
Message-ID: <25767218.3393441250629814335.JavaMail.root@zimbra3-e1.priv.proxad.net>
Date: Tue, 18 Aug 2009 23:10:14 +0200 (CEST)
From: dimitri.gorokhovik@...e.fr
To: David Woodhouse <dwmw2@...radead.org>,
David Woodhouse <David.Woodhouse@...el.com>,
Tim Gardner <tim.gardner@...onical.com>,
Scott James Remnant <scott@...onical.com>,
Julia Lawall <julia@...u.dk>,
David Brownell <dbrownell@...rs.sourceforge.net>
Cc: linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH] nftl: write support is broken
Write support is broken in NFTL. Fix it.
Signed-off-by: <dimitri.gorokhovik@...e.fr>
---
diff --git a/drivers/mtd/nftlcore.c b/drivers/mtd/nftlcore.c
index fb86cac..665d3eb 100644
--- a/drivers/mtd/nftlcore.c
+++ b/drivers/mtd/nftlcore.c
@@ -181,7 +181,7 @@ static int nftl_write(struct mtd_info *mtd, loff_t offs, size_t len,
int res;
ops.mode = MTD_OOB_PLACE;
- ops.ooboffs = offs;
+ ops.ooboffs = offs & (mtd->writesize - 1);
ops.ooblen = mtd->oobsize;
ops.oobbuf = oob;
ops.datbuf = buf;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists