Commit:     3fddb6c985e3823c991399840d2d5ef5940e1b60
Parent:     693ef66d8914f50cb899b5268676ea508d1f3178
Author:     David Woodhouse <[EMAIL PROTECTED]>
AuthorDate: Sat May 5 09:52:49 2007 +0100
Committer:  David Woodhouse <[EMAIL PROTECTED]>
CommitDate: Sat May 5 09:52:49 2007 +0100

    [JFFS2] Don't advance c->wbuf_ofs to next eraseblock after wbuf flush
    After flushing the last page of an eraseblock, don't leave the
    wbuf 'offset' field pointing at the start of the next physical
    eraseblock. This was causing a BUG() on NOR-ECC (Sibley) flash, where
    we start writing a little further in, after the cleanmarker.
    Debugged by Alexander Belyakov <[EMAIL PROTECTED]>
    Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
 fs/jffs2/wbuf.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
index c556e85..91d1d0f 100644
--- a/fs/jffs2/wbuf.c
+++ b/fs/jffs2/wbuf.c
@@ -637,7 +637,10 @@ static int __jffs2_flush_wbuf(struct jffs2_sb_info *c, int 
        /* adjust write buffer offset, else we get a non contiguous write bug */
-       c->wbuf_ofs += c->wbuf_pagesize;
+       if (SECTOR_ADDR(c->wbuf_ofs) == 
+               c->wbuf_ofs += c->wbuf_pagesize;
+       else
+               c->wbuf_ofs = 0xffffffff;
        c->wbuf_len = 0;
        return 0;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to