]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/jffs2/nodemgmt.c
Linux 2.6.28-rc1
[linux-2.6-omap-h63xx.git] / fs / jffs2 / nodemgmt.c
index a9bf9603c1ba0cca4fac8d56ea2dae4bbfe33b91..0875b60b4bf700cc8fda2fad76437d0dc9ea7420 100644 (file)
@@ -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;