]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
mtd: nftl: write support is broken
authorDimitri Gorokhovik <dimitri.gorokhovik@free.fr>
Thu, 3 Sep 2009 13:59:13 +0000 (14:59 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 3 Sep 2009 13:59:13 +0000 (14:59 +0100)
Write support is broken in NFTL. Fix it.

Signed-off-by: <dimitri.gorokhovik@free.fr>
Cc: Tim Gardner <tim.gardner@canonical.com>
Cc: Scott James Remnant <scott@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nftlcore.c

index fb86cacd5bdb66adf754c8ce6ed940ff89e266a8..665d3eba2f47d2ee62fab71c12c3420cc591fd91 100644 (file)
@@ -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;