Commit b48f4fe6 authored by Todd Poynor's avatar Todd Poynor Committed by Tony Lindgren

[JFFS2] JFFS2 fixes

JFFS2 fixes.
Signed-off-by: default avatarTodd Poynor <tpoynor@mvista.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 21c679c5
...@@ -127,7 +127,7 @@ int jffs2_get_inode_nodes(struct jffs2_sb_info *c, struct jffs2_inode_info *f, ...@@ -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); 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); printk(KERN_WARNING "Eep. No valid nodes for ino #%u\n", f->inocache->ino);
while (valid_ref) { while (valid_ref) {
......
...@@ -532,6 +532,9 @@ int jffs2_flush_wbuf_gc(struct jffs2_sb_info *c, uint32_t ino) ...@@ -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)); D1(printk(KERN_DEBUG "jffs2_flush_wbuf_gc() called for ino #%u...\n", ino));
if (!c->wbuf)
return 0;
down(&c->alloc_sem); down(&c->alloc_sem);
if (!jffs2_wbuf_pending_for_ino(c, ino)) { if (!jffs2_wbuf_pending_for_ino(c, ino)) {
D1(printk(KERN_DEBUG "Ino #%d not pending in wbuf. Returning\n", 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) ...@@ -578,6 +581,9 @@ int jffs2_flush_wbuf_pad(struct jffs2_sb_info *c)
{ {
int ret; int ret;
if (!c->wbuf)
return 0;
down_write(&c->wbuf_sem); down_write(&c->wbuf_sem);
ret = __jffs2_flush_wbuf(c, PAD_NOACCOUNT); ret = __jffs2_flush_wbuf(c, PAD_NOACCOUNT);
up_write(&c->wbuf_sem); up_write(&c->wbuf_sem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment