]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/jffs2/nodemgmt.c
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-omap-h63xx.git] / fs / jffs2 / nodemgmt.c
index 9df8f3ef20dfd8d8a39d59ee02d4e14ea2713927..21a052915aa9363acb0cd1e2b34567ef782b57f5 100644 (file)
@@ -261,6 +261,12 @@ static int jffs2_find_nextblock(struct jffs2_sb_info *c)
 
        jffs2_sum_reset_collected(c->summary); /* reset collected summary */
 
+#ifdef CONFIG_JFFS2_FS_WRITEBUFFER
+       /* 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;
+#endif
+
        D1(printk(KERN_DEBUG "jffs2_find_nextblock(): new nextblock = 0x%08x\n", c->nextblock->offset));
 
        return 0;
@@ -709,7 +715,7 @@ void jffs2_mark_node_obsolete(struct jffs2_sb_info *c, struct jffs2_raw_node_ref
                                break;
 #endif
                        default:
-                               if (ic->nodes == (void *)ic && ic->nlink == 0)
+                               if (ic->nodes == (void *)ic && ic->pino_nlink == 0)
                                        jffs2_del_ino_cache(c, ic);
                                break;
                }