From: Todd Poynor Date: Mon, 9 May 2005 21:13:14 +0000 (-0700) Subject: [JFFS2] JFFS2 fixes X-Git-Tag: v2.6.13-omap1~173 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=b48f4fe6ba31a5a09d3d79f046feba84cfe983a1;p=linux-2.6-omap-h63xx.git [JFFS2] JFFS2 fixes JFFS2 fixes. Signed-off-by: Todd Poynor Signed-off-by: Tony Lindgren --- diff --git a/fs/jffs2/nodelist.c b/fs/jffs2/nodelist.c index cd6a8bd13e0..8b6c02ae203 100644 --- a/fs/jffs2/nodelist.c +++ b/fs/jffs2/nodelist.c @@ -127,7 +127,7 @@ int jffs2_get_inode_nodes(struct jffs2_sb_info *c, struct jffs2_inode_info *f, valid_ref = jffs2_first_valid_node(f->inocache->nodes); - if (!valid_ref) + if (!valid_ref && (f->inocache->ino != 1)) printk(KERN_WARNING "Eep. No valid nodes for ino #%u\n", f->inocache->ino); while (valid_ref) { diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c index c8128069ecf..8d9019e1c4d 100644 --- a/fs/jffs2/wbuf.c +++ b/fs/jffs2/wbuf.c @@ -532,6 +532,9 @@ int jffs2_flush_wbuf_gc(struct jffs2_sb_info *c, uint32_t ino) D1(printk(KERN_DEBUG "jffs2_flush_wbuf_gc() called for ino #%u...\n", ino)); + if (!c->wbuf) + return 0; + down(&c->alloc_sem); if (!jffs2_wbuf_pending_for_ino(c, ino)) { D1(printk(KERN_DEBUG "Ino #%d not pending in wbuf. Returning\n", ino)); @@ -578,6 +581,9 @@ int jffs2_flush_wbuf_pad(struct jffs2_sb_info *c) { int ret; + if (!c->wbuf) + return 0; + down_write(&c->wbuf_sem); ret = __jffs2_flush_wbuf(c, PAD_NOACCOUNT); up_write(&c->wbuf_sem);