diff options
Diffstat (limited to 'fs/jffs2')
-rw-r--r-- | fs/jffs2/nodemgmt.c | 4 | ||||
-rw-r--r-- | fs/jffs2/wbuf.c | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c index a9bf9603c1ba..0875b60b4bf7 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) | |||
261 | 261 | ||
262 | jffs2_sum_reset_collected(c->summary); /* reset collected summary */ | 262 | jffs2_sum_reset_collected(c->summary); /* reset collected summary */ |
263 | 263 | ||
264 | /* adjust write buffer offset, else we get a non contiguous write bug */ | ||
265 | if (!(c->wbuf_ofs % c->sector_size) && !c->wbuf_len) | ||
266 | c->wbuf_ofs = 0xffffffff; | ||
267 | |||
264 | D1(printk(KERN_DEBUG "jffs2_find_nextblock(): new nextblock = 0x%08x\n", c->nextblock->offset)); | 268 | D1(printk(KERN_DEBUG "jffs2_find_nextblock(): new nextblock = 0x%08x\n", c->nextblock->offset)); |
265 | 269 | ||
266 | return 0; | 270 | return 0; |
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c index 0e78b00035e4..d9a721e6db70 100644 --- a/fs/jffs2/wbuf.c +++ b/fs/jffs2/wbuf.c | |||
@@ -679,10 +679,7 @@ static int __jffs2_flush_wbuf(struct jffs2_sb_info *c, int pad) | |||
679 | 679 | ||
680 | memset(c->wbuf,0xff,c->wbuf_pagesize); | 680 | memset(c->wbuf,0xff,c->wbuf_pagesize); |
681 | /* adjust write buffer offset, else we get a non contiguous write bug */ | 681 | /* adjust write buffer offset, else we get a non contiguous write bug */ |
682 | if (SECTOR_ADDR(c->wbuf_ofs) == SECTOR_ADDR(c->wbuf_ofs+c->wbuf_pagesize)) | 682 | c->wbuf_ofs += c->wbuf_pagesize; |
683 | c->wbuf_ofs += c->wbuf_pagesize; | ||
684 | else | ||
685 | c->wbuf_ofs = 0xffffffff; | ||
686 | c->wbuf_len = 0; | 683 | c->wbuf_len = 0; |
687 | return 0; | 684 | return 0; |
688 | } | 685 | } |