X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=fs%2Fjffs2%2Fnodemgmt.c;h=0875b60b4bf700cc8fda2fad76437d0dc9ea7420;hb=57f8f7b60db6f1ed2c6918ab9230c4623a9dbe37;hp=a9bf9603c1ba0cca4fac8d56ea2dae4bbfe33b91;hpb=4880d10927c93d858d40e297361fff375ee98492;p=linux-2.6-omap-h63xx.git diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c index a9bf9603c1b..0875b60b4bf 100644 --- a/fs/jffs2/nodemgmt.c +++ b/fs/jffs2/nodemgmt.c @@ -261,6 +261,10 @@ static int jffs2_find_nextblock(struct jffs2_sb_info *c) jffs2_sum_reset_collected(c->summary); /* reset collected summary */ + /* adjust write buffer offset, else we get a non contiguous write bug */ + if (!(c->wbuf_ofs % c->sector_size) && !c->wbuf_len) + c->wbuf_ofs = 0xffffffff; + D1(printk(KERN_DEBUG "jffs2_find_nextblock(): new nextblock = 0x%08x\n", c->nextblock->offset)); return 0;